--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/contentstorage/caclient/tsrc/t_caclient/src/t_caclient_backupnotifier.cpp Thu Sep 16 12:11:40 2010 +0100
@@ -0,0 +1,71 @@
+/*
+* Copyright (c) 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: Main test class for hspluginmodel library.
+*
+*/
+#include "t_caclient.h"
+#include "caservice.h"
+#include "caquery.h"
+#include <sacls.h>
+#include <connect/sbdefs.h>
+
+#ifdef Q_OS_SYMBIAN
+//s60
+#include <e32base.h>
+//#include <>
+#include <W32STD.H>
+#include <APGTASK.H>
+
+#include "t_caclient.h"
+#include "cabackupnotifier.h"
+#include "castorageproxy.h"
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+void TestCaClient::TestCreateBackupNotifier()
+{
+ QScopedPointer<CCaStorageProxy> proxy( CCaStorageProxy::NewL() ) ;
+ QScopedPointer<CCaBackupNotifier> notifier( CCaBackupNotifier::NewL( proxy.data() ) );
+
+ QVERIFY( notifier );
+
+}
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+void TestCaClient::TestBackupNotifierRunL()
+{
+ QScopedPointer<CCaStorageProxy> proxy( CCaStorageProxy::NewL() );
+ QScopedPointer<CCaBackupNotifier> notifier( CCaBackupNotifier::NewL( proxy.data() ) );
+
+ TUid KUidMyCat={0x101aaaa6};
+ RProperty::Define(KUidMyCat, 0, RProperty::EInt, 0);
+
+ notifier->Cancel();
+ notifier->iProperty.Attach(KUidMyCat,0);
+ notifier->iStatus = KRequestPending;
+ notifier->iProperty.Subscribe(notifier->iStatus);
+ notifier->SetActive();
+
+ RProperty::Set(KUidMyCat, 0, conn::EBURRestorePartial);
+ QTest::qWait(5000);
+
+ QVERIFY( notifier->iLastState == CCaBackupNotifier::ECaRestore );
+
+}
+
+
+#endif //Q_OS_SYMBIAN