SigningTS/client/test.h
author John Kern <johnk@symbian.org>
Wed, 12 May 2010 11:54:19 -0700
changeset 18 5707b75503d5
permissions -rw-r--r--
working on test for common siging test
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
18
5707b75503d5 working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff changeset
     1
#ifndef TEST_H
5707b75503d5 working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff changeset
     2
#define TEST_H
5707b75503d5 working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff changeset
     3
5707b75503d5 working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff changeset
     4
#include <qstring.h>
5707b75503d5 working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff changeset
     5
5707b75503d5 working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff changeset
     6
// Each test will be a subclass of this abstract class.
5707b75503d5 working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff changeset
     7
// A test has a sequence of steps. Each step is composed of
5707b75503d5 working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff changeset
     8
// a request and reply.
5707b75503d5 working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff changeset
     9
5707b75503d5 working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff changeset
    10
const QString BaseURL = "http://localhost:8080/";
5707b75503d5 working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff changeset
    11
const QString DefaultKey = "853b128a-0c18-42f2-835f-db9f5b6f7fb9";
5707b75503d5 working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff changeset
    12
const int ApiVersion = 1;
5707b75503d5 working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff changeset
    13
5707b75503d5 working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff changeset
    14
class TestInterface
5707b75503d5 working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff changeset
    15
{
5707b75503d5 working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff changeset
    16
5707b75503d5 working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff changeset
    17
public:
5707b75503d5 working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff changeset
    18
    virtual void  run () = 0 ; // run the test.
5707b75503d5 working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff changeset
    19
5707b75503d5 working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff changeset
    20
    enum TRESULT_STATE { PASS=0, FAIL, INPROGESS} ;
5707b75503d5 working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff changeset
    21
    virtual TRESULT_STATE getResult() = 0;
5707b75503d5 working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff changeset
    22
5707b75503d5 working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff changeset
    23
5707b75503d5 working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff changeset
    24
    enum TAPI_SIGNING_STATE { SUBMITTED=0, SCANNED, FAILED_SCAN, SIGNED,
5707b75503d5 working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff changeset
    25
                              AUDIT_IN_PROGRESS, FAILED_TESTING,
5707b75503d5 working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff changeset
    26
                              TESTING_IN_PROGRESS};
5707b75503d5 working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff changeset
    27
};
5707b75503d5 working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff changeset
    28
5707b75503d5 working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff changeset
    29
#endif // TEST_H