Digital Authentication Framework 6.0.1.33

daf_testlib.h

Go to the documentation of this file.
00001 /*
00002  * (c) 2016 Good Technology Corporation. All rights reserved.
00003  */
00004 
00016 #ifndef DAF_TESTLIB_H
00017 #define DAF_TESTLIB_H
00018 
00019 #include "DigitalAuthenticationFramework.h"
00020 
00029 typedef unsigned int DATestId;
00030 
00031 const DATestId ALL_TESTS_FIRST = 1000; 
00032 
00033 const DATestId GENERAL_TESTS_FIRST = 1000; 
00034 const DATestId GENERAL_TESTS_LAST  = 1999; 
00035 
00036 const DATestId SMIME_TESTS_FIRST = 2000; 
00037 const DATestId SMIME_TESTS_LAST  = 2999; 
00038 
00039 const DATestId TLS_TESTS_FIRST = 3000; 
00040 const DATestId TLS_TESTS_LAST  = 3999; 
00041 
00042 const DATestId ALL_TESTS_LAST  = 9999; 
00043 
00051 class DATestInterface
00052 {
00053 public:
00057   virtual DADevice *getDevice() = 0;
00058 
00066   virtual DASession *getSession() = 0;
00067 
00075   virtual void startTest( DATestId testId, const char *testName ) = 0;
00076 
00084   virtual void comment( const char *text ) { };
00085   
00098   virtual void error( const char *text, DAError *daError = NULL ) = 0;
00099 
00108   virtual void endTest() = 0;
00109 };
00110 
00116 class DATestLib
00117 {
00118 public:
00128     static void runTests(DATestInterface &wrapper, DATestId first, DATestId last);
00129 
00130 };
00131 
00132 #endif // DAF_TESTLIB_H