Digital Authentication Framework  6.0.1.37
Public Member Functions | List of all members
DATestInterface Class Referenceabstract

Interface between test library and test environment. More...

#include <daf_testlib.h>

Public Member Functions

virtual DADevicegetDevice ()=0
 Called to get a device used for the tests.
 
virtual DASessiongetSession ()=0
 Called to get a session to use for the tests. More...
 
virtual void startTest (DATestId testId, const char *testName)=0
 Called before a test begins. More...
 
virtual void comment (const char *text)
 Called to record a comment, for debugging. More...
 
virtual void error (const char *text, DAError *daError=NULL)=0
 Reports a test error. More...
 
virtual void endTest ()=0
 Called at the end of each test. More...
 

Detailed Description

Interface between test library and test environment.

The caller of the test library implements this interface; the test library will call its methods to get information, and to report the results of each test as it runs.

Member Function Documentation

virtual void DATestInterface::comment ( const char *  text)
virtual

Called to record a comment, for debugging.

Implementation of this is recommended, but optional.

Parameters
textOne-line comment text
virtual void DATestInterface::endTest ( )
pure virtual

Called at the end of each test.

Marks the end of a test sequence started by startTest(). Typically can be used to record results, and tear down anything set up by the startTest() method.

virtual void DATestInterface::error ( const char *  text,
DAError daError = NULL 
)
pure virtual

Reports a test error.

Parameters
textText description of the error
daErrorIf not NULL, points to error from DAF call.

Note that daError is typically taken from the getLastError() call on the current DASession. You should not rely on the pointer remaining valid after this call has returned, unless you can be sure this is safe for all DAError objects returned by the implementation under test.

virtual DASession* DATestInterface::getSession ( )
pure virtual

Called to get a session to use for the tests.

Typically, the session will be created by the test harness before the test run begins, and the same session will be used for a number of tests.

virtual void DATestInterface::startTest ( DATestId  testId,
const char *  testName 
)
pure virtual

Called before a test begins.

Parameters
testIdNumeric identifier of the test
testNameBrief test name summary

The documentation for this class was generated from the following file: