websrv_pub/web_service_messaging_api/tsrc/newsoapclassesTester/inc/newsoapclassesTester.h
changeset 0 62f9d29f7211
equal deleted inserted replaced
-1:000000000000 0:62f9d29f7211
       
     1 /*
       
     2 * Copyright (c) 2002 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: Header declaration
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 
       
    26 #ifndef NEWSOAPCLASSESTESTER_H
       
    27 #define NEWSOAPCLASSESTESTER_H
       
    28 
       
    29 //  INCLUDES
       
    30 #include <StifLogger.h>
       
    31 #include <SenParser.h>
       
    32 #include <SenSoapEnvelope2.h>
       
    33 #include <SenSoapFault2.h>
       
    34 #include <SenSoapMessage2.h>
       
    35 #include <SenSoapConstants.h>
       
    36 //#include <SenSoapMessageDom2.h>
       
    37 #include <SenWsSecurityHeader2.h>
       
    38 #include <SenIdentityProvider.h>
       
    39 //#include <SenMessageContext.h>
       
    40 #include <SenXmlProperties.h>
       
    41 #include <e32debug.h>
       
    42 #include <e32std.h>
       
    43 #include <e32def.h>
       
    44 #include <SenXmlConstants.h>
       
    45 #include <TestScripterInternal.h>
       
    46 #include <StifTestModule.h>
       
    47 #include <TestclassAssert.h>
       
    48 
       
    49 // CONSTANTS
       
    50 //const ?type ?constant_var = ?constant;
       
    51 
       
    52 // MACROS
       
    53 //#define ?macro ?macro_def
       
    54 #define TEST_CLASS_VERSION_MAJOR 0
       
    55 #define TEST_CLASS_VERSION_MINOR 0
       
    56 #define TEST_CLASS_VERSION_BUILD 0
       
    57 
       
    58 // Logging path
       
    59 _LIT( KnewsoapclassesTesterLogPath, "\\logs\\testframework\\newsoapclassesTester\\" ); 
       
    60 // Log file
       
    61 _LIT( KnewsoapclassesTesterLogFile, "newsoapclassesTester.txt" ); 
       
    62 _LIT( KnewsoapclassesTesterLogFileWithTitle, "newsoapclassesTester_[%S].txt" );
       
    63 
       
    64 // FUNCTION PROTOTYPES
       
    65 //?type ?function_name(?arg_list);
       
    66 
       
    67 // FORWARD DECLARATIONS
       
    68 //class ?FORWARD_CLASSNAME;
       
    69 class CSenSoapFault2;
       
    70 class CSenSoapEnvelope2;
       
    71 class CSenSoapMessage2;
       
    72 class CSenWsSecurityHeader2;
       
    73 
       
    74 class CnewsoapclassesTester;
       
    75 // DATA TYPES
       
    76 //enum ?declaration
       
    77 //typedef ?declaration
       
    78 //extern ?data_type;
       
    79 typedef TInt (CnewsoapclassesTester::* TestFunction)(CStifItemParser&);
       
    80 
       
    81 // CLASS DECLARATION
       
    82 
       
    83 class TCaseInfoInternal
       
    84     {
       
    85     public:
       
    86         const TText*    iCaseName;
       
    87         TestFunction    iMethod;
       
    88         TBool           iIsOOMTest;
       
    89         TInt            iFirstMemoryAllocation;
       
    90         TInt            iLastMemoryAllocation;
       
    91     };
       
    92 
       
    93 // CLASS DECLARATION
       
    94 
       
    95 /**
       
    96 *  A structure containing a test case name and
       
    97 *  the pointer to function doing the test
       
    98 *
       
    99 *  @lib ?library
       
   100 *  @since ?Series60_version
       
   101 */
       
   102 class TCaseInfo
       
   103     {
       
   104     public:
       
   105         TPtrC iCaseName;
       
   106         TestFunction iMethod;
       
   107         TBool           iIsOOMTest;
       
   108         TInt            iFirstMemoryAllocation;
       
   109         TInt            iLastMemoryAllocation;
       
   110 
       
   111     TCaseInfo( const TText* a ) : iCaseName( (TText*) a )
       
   112         {
       
   113         };
       
   114 
       
   115     };
       
   116 NONSHARABLE_CLASS(CnewsoapclassesTester) : public CScriptBase
       
   117     {
       
   118     public:  // Constructors and destructor
       
   119 
       
   120         /**
       
   121         * Two-phased constructor.
       
   122         */
       
   123         static CnewsoapclassesTester* NewL( CTestModuleIf& aTestModuleIf );
       
   124 
       
   125         /**
       
   126         * Destructor.
       
   127         */
       
   128         virtual ~CnewsoapclassesTester();
       
   129 
       
   130     public: // New functions
       
   131 
       
   132         /**
       
   133         * ?member_description.
       
   134         * @since ?Series60_version
       
   135         * @param ?arg1 ?description
       
   136         * @return ?description
       
   137         */
       
   138         //?type ?member_function( ?type ?arg1 );
       
   139 
       
   140     public: // Functions from base classes
       
   141 
       
   142         /**
       
   143         * From CScriptBase Runs a script line.
       
   144         * @since ?Series60_version
       
   145         * @param aItem Script line containing method name and parameters
       
   146         * @return Symbian OS error code
       
   147         */
       
   148         virtual TInt RunMethodL( CStifItemParser& aItem );
       
   149 
       
   150     protected:  // New functions
       
   151 
       
   152         /**
       
   153         * ?member_description.
       
   154         * @since ?Series60_version
       
   155         * @param ?arg1 ?description
       
   156         * @return ?description
       
   157         */
       
   158         //?type ?member_function( ?type ?arg1 );
       
   159 
       
   160     protected:  // Functions from base classes
       
   161 
       
   162         /**
       
   163         * From ?base_class ?member_description
       
   164         */
       
   165         //?type ?member_function();
       
   166 
       
   167     private:
       
   168 
       
   169         /**
       
   170         * C++ default constructor.
       
   171         */
       
   172         CnewsoapclassesTester( CTestModuleIf& aTestModuleIf );
       
   173 
       
   174         /**
       
   175         * By default Symbian 2nd phase constructor is private.
       
   176         */
       
   177         void ConstructL();
       
   178 
       
   179         // Prohibit copy constructor if not deriving from CBase.
       
   180         // ?classname( const ?classname& );
       
   181         // Prohibit assigment operator if not deriving from CBase.
       
   182         // ?classname& operator=( const ?classname& );
       
   183 
       
   184         /**
       
   185         * Frees all resources allocated from test methods.
       
   186         * @since ?Series60_version
       
   187         */
       
   188         void Delete();
       
   189         void SetupL();
       
   190         void Teardown();
       
   191 
       
   192         /**
       
   193         * Test methods are listed below. 
       
   194         */
       
   195 
       
   196          TInt MT_CSenSoapEnvelope2_NewLL(CStifItemParser& aItem);
       
   197          TInt MT_CSenSoapEnvelope2_NewLCL(CStifItemParser& aItem);
       
   198          TInt MT_CSenSoapEnvelope2_NewL_1L(CStifItemParser& aItem);
       
   199          TInt MT_CSenSoapEnvelope2_NewLC_1L(CStifItemParser& aItem);
       
   200          TInt MT_CSenSoapEnvelope2_NewL_2L(CStifItemParser& aItem);
       
   201          TInt MT_CSenSoapEnvelope2_NewLC_2L(CStifItemParser& aItem);
       
   202          TInt MT_CSenSoapEnvelope2_TypeL(CStifItemParser& aItem);
       
   203          TInt MT_CSenSoapEnvelope2_DirectionL(CStifItemParser& aItem);
       
   204          TInt MT_CSenSoapEnvelope2_TxnIdL(CStifItemParser& aItem);
       
   205          TInt MT_CSenSoapEnvelope2_CloneL(CStifItemParser& aItem);
       
   206          TInt MT_CSenSoapEnvelope2_SoapVersionL(CStifItemParser& aItem);
       
   207          TInt MT_CSenSoapEnvelope2_SetContextL(CStifItemParser& aItem);
       
   208          TInt MT_CSenSoapEnvelope2_ContextL(CStifItemParser& aItem);
       
   209          TInt MT_CSenSoapEnvelope2_SetPropertiesL(CStifItemParser& aItem);
       
   210          TInt MT_CSenSoapEnvelope2_PropertiesL(CStifItemParser& aItem);
       
   211          TInt MT_CSenSoapEnvelope2_IsSafeToCastL(CStifItemParser& aItem); 
       
   212          TInt MT_CSenSoapEnvelope2_SetBodyLL(CStifItemParser& aItem);
       
   213          TInt MT_CSenSoapEnvelope2_SetBodyL_1L(CStifItemParser& aItem);
       
   214          TInt MT_CSenSoapEnvelope2_BodyLL(CStifItemParser& aItem);
       
   215          TInt MT_CSenSoapEnvelope2_HeaderLL(CStifItemParser& aItem);
       
   216          TInt MT_CSenSoapEnvelope2_AddHeaderLL(CStifItemParser& aItem);
       
   217          TInt MT_CSenSoapEnvelope2_BodyAsStringLL(CStifItemParser& aItem);
       
   218          TInt MT_CSenSoapEnvelope2_IsFaultL(CStifItemParser& aItem);
       
   219          TInt MT_CSenSoapEnvelope2_DetachFaultLL(CStifItemParser& aItem);
       
   220          TInt MT_CSenSoapEnvelope2_FaultLL(CStifItemParser& aItem);
       
   221          TInt MT_CSenSoapEnvelope2_SetSoapActionLL(CStifItemParser& aItem);
       
   222          TInt MT_CSenSoapEnvelope2_SoapActionL(CStifItemParser& aItem);
       
   223          TInt MT_CSenSoapEnvelope2_HasHeaderL(CStifItemParser& aItem);
       
   224          TInt MT_CSenSoapEnvelope2_HasBodyL(CStifItemParser& aItem);
       
   225          TInt MT_CSenSoapEnvelope2_Parse1L(CStifItemParser& aItem);
       
   226          TInt MT_CSenSoapEnvelope2_Parse2L(CStifItemParser& aItem);
       
   227          TInt MT_CSenSoapEnvelope2_Parse3L(CStifItemParser& aItem);
       
   228          TInt MT_CSenSoapFault2_NewLL(CStifItemParser& aItem);
       
   229          TInt MT_CSenSoapFault2_NewL_1L(CStifItemParser& aItem);
       
   230          TInt MT_CSenSoapFault2_NewL_2L(CStifItemParser& aItem);
       
   231          TInt MT_CSenSoapFault2_FaultCodeL(CStifItemParser& aItem);
       
   232          TInt MT_CSenSoapFault2_FaultSubcodeL(CStifItemParser& aItem);
       
   233          TInt MT_CSenSoapFault2_FaultStringL(CStifItemParser& aItem);
       
   234          TInt MT_CSenSoapFault2_FaultActorL(CStifItemParser& aItem);
       
   235          TInt MT_CSenSoapFault2_DetailL(CStifItemParser& aItem);
       
   236          TInt MT_CSenSoapMessage2_NewLL(CStifItemParser& aItem);
       
   237          TInt MT_CSenSoapMessage2_NewLCL(CStifItemParser& aItem);
       
   238          TInt MT_CSenSoapMessage2_NewL_1L(CStifItemParser& aItem);
       
   239          TInt MT_CSenSoapMessage2_NewLC_1L(CStifItemParser& aItem);
       
   240          TInt MT_CSenSoapMessage2_NewL_2L(CStifItemParser& aItem);
       
   241          TInt MT_CSenSoapMessage2_NewLC_2L(CStifItemParser& aItem);
       
   242          TInt MT_CSenSoapMessage2_NewL_3L(CStifItemParser& aItem);
       
   243          TInt MT_CSenSoapMessage2_NewLC_3L(CStifItemParser& aItem);
       
   244          TInt MT_CSenSoapMessage2_NewL_4L(CStifItemParser& aItem);
       
   245          TInt MT_CSenSoapMessage2_NewLC_4L(CStifItemParser& aItem);
       
   246          TInt MT_CSenSoapMessage2_NewL_5L(CStifItemParser& aItem);
       
   247          TInt MT_CSenSoapMessage2_NewLC_5L(CStifItemParser& aItem);
       
   248          TInt MT_CSenSoapMessage2_NewL_6L(CStifItemParser& aItem);
       
   249          TInt MT_CSenSoapMessage2_NewLC_6L(CStifItemParser& aItem);
       
   250          TInt MT_CSenSoapMessage2_TypeL(CStifItemParser& aItem);
       
   251 		 TInt MT_CSenSoapMessage2_CloneL(CStifItemParser& aItem);
       
   252 		 TInt MT_CSenSoapMessage2_Parse1L(CStifItemParser& aItem);
       
   253          TInt MT_CSenSoapMessage2_SetSecurityHeaderLL(CStifItemParser& aItem);
       
   254          TInt MT_CSenSoapMessage2_AddSecurityTokenLL(CStifItemParser& aItem);
       
   255          TInt MT_CSenWsSecurityHeader2_NewLL(CStifItemParser& aItem);
       
   256          TInt MT_CSenWsSecurityHeader2_NewLCL(CStifItemParser& aItem);
       
   257          TInt MT_CSenWsSecurityHeader2_NewL_1L(CStifItemParser& aItem);
       
   258          TInt MT_CSenWsSecurityHeader2_NewLC_1L(CStifItemParser& aItem);
       
   259          TInt MT_CSenWsSecurityHeader2_NewL_2L(CStifItemParser& aItem);
       
   260          TInt MT_CSenWsSecurityHeader2_NewLC_2L(CStifItemParser& aItem);
       
   261          TInt MT_CSenWsSecurityHeader2_UsernameTokenLL(CStifItemParser& aItem);
       
   262          TInt MT_CSenWsSecurityHeader2_UsernameTokenL_1L(CStifItemParser& aItem);
       
   263          TInt MT_CSenWsSecurityHeader2_UsernameTokenL_2L(CStifItemParser& aItem);
       
   264          TInt MT_CSenWsSecurityHeader2_UsernameTokenL_3L(CStifItemParser& aItem);
       
   265          TInt MT_CSenWsSecurityHeader2_UsernameTokenL_4L(CStifItemParser& aItem);
       
   266          TInt MT_CSenWsSecurityHeader2_TimestampLL(CStifItemParser& aItem);
       
   267          TInt MT_CSenWsSecurityHeader2_TimestampL_1L(CStifItemParser& aItem);
       
   268          TInt MT_CSenWsSecurityHeader2_XmlNsL(CStifItemParser& aItem);
       
   269          TInt MT_CSenWsSecurityHeader2_XmlNsPrefixL(CStifItemParser& aItem);
       
   270          
       
   271         
       
   272         /**
       
   273          * Method used to log version of test class
       
   274          */
       
   275         void SendTestClassVersion();
       
   276 
       
   277         //ADD NEW METHOD DEC HERE
       
   278         //[TestMethods] - Do not remove
       
   279 
       
   280     public:     // Data
       
   281         // ?one_line_short_description_of_data
       
   282         //?data_declaration;
       
   283 
       
   284     protected:  // Data
       
   285         // ?one_line_short_description_of_data
       
   286         //?data_declaration;
       
   287 
       
   288     private:    // Data
       
   289         // Pointer to test (function) to be executed
       
   290         TestFunction iMethod;
       
   291 
       
   292         // Pointer to logger
       
   293         CStifLogger * iLog; 
       
   294 
       
   295 		CSenXmlReader* iXmlReader;
       
   296         // ?one_line_short_description_of_data
       
   297         //?data_declaration;
       
   298 
       
   299         // Reserved pointer for future extension
       
   300         //TAny* iReserved;
       
   301 
       
   302     public:     // Friend classes
       
   303         //?friend_class_declaration;
       
   304     protected:  // Friend classes
       
   305         //?friend_class_declaration;
       
   306     private:    // Friend classes
       
   307         //?friend_class_declaration;
       
   308 
       
   309     };
       
   310 
       
   311 #endif      // NEWSOAPCLASSESTESTER_H
       
   312 
       
   313 // End of File