|
1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #ifndef __CTESTIMAPSERVERMTMBASE_H__ |
|
17 #define __CTESTIMAPSERVERMTMBASE_H__ |
|
18 |
|
19 #include <cemailaccounts.h> |
|
20 #include "cspoofserver.h" |
|
21 #include "emailtestutils.h" |
|
22 #include <test/tefunit.h> |
|
23 #include "cimapsettings.h" |
|
24 |
|
25 class CActiveWaiter; |
|
26 |
|
27 // Note that all test suites must begin with "CTest" |
|
28 class CTestImapServerMtmBase : public CActiveTestFixture, |
|
29 public MImapTestEventHandler |
|
30 { |
|
31 public: |
|
32 virtual ~CTestImapServerMtmBase( ); |
|
33 |
|
34 // SetUp and TearDown code (optional) |
|
35 virtual void SetupL( ); |
|
36 virtual void TearDownL( ); |
|
37 |
|
38 protected: |
|
39 CTestImapServerMtmBase( ); |
|
40 |
|
41 void DoConnectL( ); |
|
42 void DoDisconnectL( ); |
|
43 void DoCreateImapAccountL( ); |
|
44 void DoStartSpoofServerL( const TDesC& aScriptSection ); |
|
45 void DoLoadDriversL( ); |
|
46 private: |
|
47 // from MImapTestEventHandler |
|
48 virtual void TestComplete( TInt aErrorCode ); |
|
49 protected: |
|
50 CEmailTestUtils* iTestUtils; |
|
51 CBaseServerMtm* iImapServerMtm; // No ownership |
|
52 CSpoofServer* iSpoofServer; |
|
53 CImapSettings* iImapSettings; |
|
54 CEmailAccounts* iAccounts; |
|
55 TImapAccount iImapAccount; |
|
56 |
|
57 CActiveWaiter* iActiveWaiter; |
|
58 TMsvId iServiceId ; |
|
59 CMsvServerEntry* iEntry; |
|
60 |
|
61 CMsvEntrySelection* iSelection; |
|
62 |
|
63 RTest iTest; |
|
64 }; |
|
65 |
|
66 #endif //__CTESTIMAPSERVERMTMBASE_H__ |