messagingfw/wappushfw/pushutils/test/t_failure.h
changeset 0 8e480a14352b
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/messagingfw/wappushfw/pushutils/test/t_failure.h	Mon Jan 18 20:36:02 2010 +0200
@@ -0,0 +1,68 @@
+// Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// WAP Push - ConnectionManager Test Harness
+// 
+//
+
+#ifndef __T_FAILURE_H__
+#define __T_FAILURE_H__
+
+//
+//          CFailureTester: INTERFACE          //
+//
+
+class CPushMessageTester : public CBase
+	{
+public:
+	static CPushMessageTester* NewL();
+	~CPushMessageTester();
+	
+	void FailureTestL();
+	void PluginFailureTestL();
+private:
+	CPushMessageTester();
+private:
+	HBufC8*	iBody;
+	HBufC8* iHeader;
+	CPushMessage* iMessage;
+	};
+
+class CFailureTester : public CBase
+	{
+public:
+	static CFailureTester* NewL(CWapPushLog& aWapLog);
+	~CFailureTester();
+	
+	void HeapFailureTest();
+	void InitSchedulerL();
+	void PluginHeapFailureTest();
+private:
+	CFailureTester(CWapPushLog& aWapLog);
+	CPushMessageTester* DoPushMessageTestL();
+	CPushMessage* DoPushMessageTest2L();
+	CPushMessageTester* CreatePushHandlerBaseL();
+	
+	//Logging functions
+	void LogStr(const TDesC& aDes);
+	void LogFormatInt(const TDesC& aFormat, TInt aInt);
+	void LogFormatInt(const TDesC& aFormat, TInt aInt1, TInt aInt2);
+	void LogFormatStr(const TDesC& aFormat, const TDesC& aDes);
+
+private:
+	CWapPushLog& iLog;  //Don't own this
+	TBuf<256> iFormatBuffer;
+	CActiveScheduler	*iScheduler;
+	};
+
+#endif