 |
 |
|
Rajinder Yadav - Windows C++ Development Tools & Resources :Design, Code, Test, Deploy |
// Source: IUnitTestObserver.h
// Author: Rajinder Yadav
// Date: July 3, 2004
//
// Copyright (c) Rajinder Yadav 2004, 2007
//
// web: http://devmentor.org
// email: rajinder@devmentor.org
//
#ifndef _IUnitTestObserver_h_
#define _IUnitTestObserver_h_
// forward declaration
struct IUnitTestRunner;
// this is an observer pattern interface
// a class must implement this interface if it wants to be notified of
// unit test results: { pass, fail, exception }
//
// the observer class needs to register itself with a UnitTestRunner
// event source before notification are sent through this interface
//
struct IUnitTestObserver
{
virtual void UnitTestStart( IUnitTestRunner& subject ) = 0; // pre unit test execution
virtual void UnitTestEnd( IUnitTestRunner& subject ) = 0; // post unit test execution
virtual void Failed( IUnitTestRunner& subject ) = 0;
virtual void Passed( IUnitTestRunner& subject ) = 0;
virtual void Exception( IUnitTestRunner& subject ) = 0;
};
#endif // _IUnitTestObserver_h_
Back
Copyright © 2007 Rajinder Yadav, All rights reserved