Click here to Skip to main content
15,892,809 members
Articles / Desktop Programming / MFC

Unit Test's Reporter

Rate me:
Please Sign up or sign in to vote.
4.86/5 (28 votes)
19 Feb 2006CPOL11 min read 64.8K   2.8K   58  
The article describes an application built to visualise testing processes for the unit test framework of CppUnitLite.
#ifndef	_PRINT_HELPER_H
#define	_PRINT_HELPER_H

#include	"Environment.h"

template <typename T>
class PrintHelper  : public IEnvironment<T>
{
public:
	PrintHelper()
	:	IEnvironment<T>(null)
	{
	}

	PrintHelper(IActionHelper<T>* action)
	:	IEnvironment<T>(null,action)
	{
	}

	virtual ~PrintHelper()
	{
	}

	virtual bool	InsertObject(void* parent, void* object)
	{
		return true;
	}
	
	virtual	bool	SetState(
			void*	linkedObject)
	{
		return true;
	}

	virtual bool	DeleteObject(void* object)
	{
		return true;
	}

	virtual	void	Action	(T& object)
	{
		if (ActionHelper())
			ActionHelper()->CallAction(object);
	}
};

#endif

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
Israel Israel
MSc in System Engineering from Tallinn Technical University, Estonia. Currently, I work in a hitech enterprise in Israel.

Comments and Discussions