securitysettings/qtconfigutils/tsrc/src/testqtconfigutils.h
changeset 26 9abfd4f00d37
equal deleted inserted replaced
25:e03a3db4489e 26:9abfd4f00d37
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 * This is the header file for testing EAP Configuration Interface.
       
    16 */
       
    17 
       
    18 /*
       
    19  * %version: 5 %
       
    20  */
       
    21 
       
    22 #ifndef TESTQTCONFIGUTILS_H_
       
    23 #define TESTQTCONFIGUTILS_H_
       
    24 
       
    25 // System includes
       
    26 #include <QObject>
       
    27 
       
    28 // User includes
       
    29 
       
    30 // Forward declarations
       
    31 class QSignalSpy;
       
    32 class EapQtConfigInterface;
       
    33 class EapQtPluginHandle;
       
    34 class EapQtCertificateInfo;
       
    35 class CmManagerShim;
       
    36 class CmConnectionMethodShim;
       
    37 
       
    38 // External data types
       
    39 
       
    40 // Constants
       
    41 
       
    42 class TestQtConfigUtils: public QObject
       
    43 {
       
    44     Q_OBJECT
       
    45     
       
    46 private slots:
       
    47 
       
    48     // Functions from QTest framework.
       
    49     void initTestCase();
       
    50     void cleanupTestCase();
       
    51     void init();
       
    52     void cleanup();
       
    53 
       
    54 #if 1
       
    55     // test EapQtPluginInfo
       
    56     void testEapQtPluginInfoPluginUndefined();
       
    57     void testEapQtPluginInfoPluginEapAka();
       
    58     void testEapQtPluginInfoPluginEapFast();
       
    59     void testEapQtPluginInfoPluginEapGtc();
       
    60     void testEapQtPluginInfoPluginLeap();
       
    61     void testEapQtPluginInfoPluginEapMschapv2();
       
    62     void testEapQtPluginInfoPluginPeap();
       
    63     void testEapQtPluginInfoPluginEapSim();
       
    64     void testEapQtPluginInfoPluginEapTls();
       
    65     void testEapQtPluginInfoPluginEapTtls();
       
    66     void testEapQtPluginInfoPluginPap();
       
    67     void testEapQtPluginInfoPluginPlainMschapv2();
       
    68     void testEapQtPluginInfoAssignment();
       
    69     void testEapQtPluginInfoSelfAssignment();
       
    70 
       
    71     // test EapQtPluginHandle (for coverage in addition to the onces above)
       
    72     void testEapQtPluginHandleDefaultConstructor();
       
    73     void testEapQtExpandedEapTypeLastConstructor();
       
    74     void testEapQtPluginHandlePluginLastConstructor();
       
    75     void testEapQtPluginHandleEapTypeConstructor();
       
    76     void testEapQtPluginHandleEapTypeUidConstructor();
       
    77     void testEapQtPluginHandleSelfAssignment();
       
    78 
       
    79     // test EapQtExpandedEapType (for coverage in addition to the onces above)
       
    80     void testEapQtExpandedEapTypeDefaultConstructor();
       
    81     void testEapQtExpandedEapTypeConstructorWpsType();
       
    82     void testEapQtExpandedEapTypeConstructorWpsByteArray();
       
    83     void testEapQtExpandedEapTypeAssignment();
       
    84     void testEapQtExpandedEapTypeSelfAssignment();
       
    85 
       
    86     // test EapQtConfigInterface
       
    87     void testDefaultConstructor();
       
    88     void testConstructorThrowing();
       
    89     void testParallelInstances();
       
    90     void testSetConfigurationReferenceUndefinedAgain();
       
    91     void testSetConfigurationReferenceFailure();
       
    92     void testCertificateAuthorityCertificates();
       
    93     void testUserCertificates();
       
    94     void testSupportedOuterTypes();
       
    95     void testSupportedInnerTypesPeap();
       
    96     void testIsSupportedOuterTypePeap();
       
    97     void testIsSupportedInnerTypePeap();
       
    98     // this must be executed before the rest of the tests
       
    99     void testSetConfigurationReferenceValidWlanIap();
       
   100     void testTestAgainForValidWlanIap();
       
   101     void testSelectedOuterTypes();
       
   102     void testIsSupportedTypeNewInstance();
       
   103     void testSaveConfigurationFull();
       
   104     void testSaveConfigurationEapTtls();
       
   105 #endif
       
   106 
       
   107     void testUiInstance();
       
   108     
       
   109 private:
       
   110 
       
   111 private:
       
   112     EapQtConfigInterface* mEapConfigIf;
       
   113     QList<EapQtCertificateInfo> mCaCertInfo;
       
   114     QList<EapQtCertificateInfo> mUserCertInfo;
       
   115     CmManagerShim* mCmm;
       
   116     CmConnectionMethodShim* mCmmShim;
       
   117 
       
   118 };
       
   119 
       
   120 #endif /* TESTQTCONFIGUTILS_H_ */
       
   121