diff -r 000000000000 -r e4d67989cc36 lowlevellibsandfws/pluginfw/Framework/BackupNotifierTest/BackupNotifierUnitTestContext.inl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lowlevellibsandfws/pluginfw/Framework/BackupNotifierTest/BackupNotifierUnitTestContext.inl Tue Feb 02 02:01:42 2010 +0200 @@ -0,0 +1,64 @@ +// Copyright (c) 2001-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: +// The context for the unit tests upon the CBackupNotifier class methods. +// Additionally supply a stub for the CBackupNotifier observation class that +// logs the resume and suspend calls +// +// + +#include "BackupNotifierTransitions.h" + +// ______________________________________________________________________________ +// +inline CNotificationStub::CNotificationStub(CDataLogger& aDataLogger) +: CBase(), iDataLogger(aDataLogger) + { + // Do nothing + } + +inline CNotificationStub::~CNotificationStub() + { + // Do nothing + } + +inline TInt CNotificationStub::Suspend() + { + _LIT(KBackupNotifierObserverSuspendMethod, "MBackupNotifierObserver::Suspend called"); + iDataLogger.LogInformation(KBackupNotifierObserverSuspendMethod); + return KErrNone; + } + +inline TInt CNotificationStub::Resume() + { + _LIT(KBackupNotifierObserverResumeMethod, "MBackupNotifierObserver::Resume called"); + iDataLogger.LogInformation(KBackupNotifierObserverResumeMethod); + return KErrNone; + } + +// ______________________________________________________________________________ +// +inline CBackupNotifier_UnitTestContext::CBackupNotifier_UnitTestContext(CDataLogger& aDataLogger, + MStateAccessor& aStateAccessor, + MTransitionObserver& aObserver) +: CUnitTestContext(aDataLogger, aStateAccessor, aObserver) + { + //Do nothing + } + +inline CBackupNotifier_UnitTestContext::~CBackupNotifier_UnitTestContext() + { + delete iBackupNotifier; + delete iStub; + } +