phoneapp/phoneuistates/tsrc/ut_cphsingleandcallsetupandwait/Src/ut_cphsingleandcallsetupandwait.cpp
changeset 78 baacf668fe89
parent 74 d1c62c765e48
--- a/phoneapp/phoneuistates/tsrc/ut_cphsingleandcallsetupandwait/Src/ut_cphsingleandcallsetupandwait.cpp	Mon Oct 04 16:06:10 2010 +0300
+++ b/phoneapp/phoneuistates/tsrc/ut_cphsingleandcallsetupandwait/Src/ut_cphsingleandcallsetupandwait.cpp	Fri Oct 15 12:58:46 2010 +0300
@@ -27,6 +27,12 @@
 #include "TPhoneCommandParam.h"
 #include "CPhoneMainResourceResolver.h"
 #include "phoneappcommands.hrh"
+#include <csmcmockcontext.h>
+#include <smcdefaultvalue.h>
+#include <msmcmockspecbuilder.h>
+#include <smcobjecttotypemapper.h>
+#include <smcmacros.h>
+#include <msmcmockaction.h>
 
 
 // - Construction -----------------------------------------------------------
@@ -48,6 +54,7 @@
 
 ut_cphsingleandcallsetupandwait::~ut_cphsingleandcallsetupandwait()
     {
+    CSmcMockContext::Release();
     }
 
 ut_cphsingleandcallsetupandwait::ut_cphsingleandcallsetupandwait()
@@ -57,6 +64,7 @@
 void ut_cphsingleandcallsetupandwait::ConstructL()
     {
     CEUnitTestSuiteClass::ConstructL();
+    iMockContext = CSmcMockContext::InstanceL();
     }
 
 // - Test methods -----------------------------------------------------------
@@ -65,6 +73,7 @@
 
 void ut_cphsingleandcallsetupandwait::SetupL(  )
     {
+    iMockContext->InitializeL();
     iViewCommandHandle = CPhoneViewController::NewL();
     iStateMachine = CPhoneStateMachineStub::NewL(); 
      
@@ -80,6 +89,7 @@
     delete iStateSingleAndCallSetupAndWaiting;
     delete iViewCommandHandle;
     delete iStateMachine;
+    iMockContext->Reset();
     }
     
 // -----------------------------------------------------------------------------