|
1 // Copyright (c) 2007-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 __CTESTSMTPMOBILITYACCOUNTS_H__ |
|
17 #define __CTESTSMTPMOBILITYACCOUNTS_H__ |
|
18 |
|
19 #include <test/tefunit.h> |
|
20 #include "cemailaccounts.h" |
|
21 |
|
22 class CImSmtpSettings; |
|
23 class CImIAPPreferences; |
|
24 class CImSmtpMobilitySettings; |
|
25 class CImSmtpMobilitySettings; |
|
26 |
|
27 /** |
|
28 @internalTechnology |
|
29 @prototype |
|
30 */ |
|
31 class CTestSmtpMobilityAccounts : public CActiveTestFixture |
|
32 { |
|
33 public: |
|
34 CTestSmtpMobilityAccounts(); |
|
35 ~CTestSmtpMobilityAccounts(); |
|
36 |
|
37 virtual void SetupL(); |
|
38 virtual void TearDownL(); |
|
39 |
|
40 void TestSmtpAccountL(); |
|
41 void Test1MobilityAccountL(); |
|
42 void Test1MobilityAccountWithParentDeletionL(); |
|
43 void Test2MobilityAccountsL(); |
|
44 void Test2MobilityAccountsWithParentDeletionL(); |
|
45 void Test2MobilityAccountsWithSameParentDeletionL(); |
|
46 void Test2MobilityAccountsWithSameParentL(); |
|
47 void TestMobilityAccountWithPopL(); |
|
48 void TestMobilityAccountWithImapL(); |
|
49 void Test3MobilityAccountsDelete123L(); |
|
50 void Test3MobilityAccountsDelete321L(); |
|
51 void Test3MobilityAccountsDelete213L(); |
|
52 void TestChangeMobilityAccountSettingsL(); |
|
53 void TestChangeMobilityAccountIapListL(); |
|
54 |
|
55 void Test1LinkedMobilityAccountL(); |
|
56 void Test1LinkedMobilityAccountWithLinkedDeletionL(); |
|
57 void Test2LinkedMobilityAccountsL(); |
|
58 void Test2LinkedMobilityAccountsWithLinkedDeletionL(); |
|
59 void Test2LinkedMobilityAccountsWithSameLinkedDeletionL(); |
|
60 void Test2LinkedMobilityAccountsWithSameLinkedL(); |
|
61 void TestLinkedMobilityAccountWithPopL(); |
|
62 void TestLinkedMobilityAccountWithImapL(); |
|
63 void Test3LinkedMobilityAccountsDelete123L(); |
|
64 void Test3LinkedMobilityAccountsDelete321L(); |
|
65 void Test3LinkedMobilityAccountsDelete213L(); |
|
66 void TestChangeLinkedMobilityAccountIapListL(); |
|
67 |
|
68 void TestMobilityAccountLinkedToParentL(); |
|
69 void Test2MobilityAccountsWithSameParentAndIapL(); |
|
70 void TestMobilityAccountWith0IapsL(); |
|
71 void TestMobilityAccountWith33IapsL(); |
|
72 void TestCreate33MobilityAccountsWithSameParentL(); |
|
73 void TestCreateMobilityAccountWithTooLongAccountNameL(); |
|
74 void TestDeleteNonExistentMobilityAccountL(); |
|
75 void TestLoadMobilitySettingsForNonExistentMobilityAccountL(); |
|
76 void TestSaveMobilitySettingsForLinkedMobilityAccountL(); |
|
77 void TestSaveMobilitySettingsForNonExistentMobilityAccountL(); |
|
78 void TestLoadIapListForNonExistentMobilityAccountL(); |
|
79 void TestSaveIapListWith0IapsL(); |
|
80 void TestSaveIapListWith33IapsL(); |
|
81 void TestSaveIapListWithExistingIapL(); |
|
82 void TestSaveIapListForNonExistentMobilityAccountL(); |
|
83 void TestWrongAccountTypesL(); |
|
84 |
|
85 void TestLoadMobilitySettingsForSmtpAccountAndIapL(); |
|
86 void TestLoadMobilitySettingsForNonExistentSmtpAccountAndIapL(); |
|
87 void TestLoadMobilitySettingsForSmtpAccountAndNonExistentIapL(); |
|
88 |
|
89 static CTestSuite* CreateSuiteL(const TDesC& aName); |
|
90 |
|
91 private: |
|
92 void ResetAccountsL(); |
|
93 void CheckNumberSMTPAccountsL(TInt aNum); |
|
94 void CheckSmtpAccountSettingsL(TSmtpAccount aAccount, const CImSmtpSettings& aSettings); |
|
95 void CheckNumberMobilityAccountsL(TInt aNum); |
|
96 void CheckNumberMobilityAccountsL(TInt aNum, TSmtpAccount aSmtpAcc); |
|
97 void CheckMobilityAccountDetailsL(const TDesC& aAccName, const CImSmtpSettings& aSmtpSettings, const RArrayIAP& aIapList, TBool aReadOnly, TSmtpAccount aSmtpAcc); |
|
98 void CheckMobilityAccountMissingL(const TDesC& aAccName); |
|
99 |
|
100 private: |
|
101 CEmailAccounts* iEmailAccounts; |
|
102 CImSmtpSettings* iSmtpAccSettings; |
|
103 CImIAPPreferences* iIapPrefs; |
|
104 CImSmtpMobilitySettings* iMobAccSettings; |
|
105 RArrayIAP iIapList; |
|
106 }; |
|
107 |
|
108 #endif __CTESTSMTPMOBILITYACCOUNTS_H__ |