ApplicationTest.cpp 812 Bytes
#include "ApplicationTest.h"

#include <stdio.h>
#include <string.h>

#include "Application.h"
#include "../TimeManager/TimeManager.h"

#define CONFIG_FILE "config/app.config"

using namespace TREPS::TimeManager;

CPPUNIT_TEST_SUITE_REGISTRATION( ApplicationTest );

ApplicationTest::ApplicationTest(void) : app(NULL)
{
}

void ApplicationTest::setUp(void)
{
	this->app = ApplicationClass::getInstance();
}

void ApplicationTest::tearDown(void)
{
}

void ApplicationTest::TestInitApplication(void)
{
	//test config instance
	CPPUNIT_ASSERT( app->getConf() != NULL );

	//test logger instance
	CPPUNIT_ASSERT( app->getLog() != NULL );
	CPPUNIT_ASSERT( app->getLog()->getPtr() != 0 );

	//test time manager instance
	TimeManagerClass *timeMgr = TimeManagerClass::getInstance();

	CPPUNIT_ASSERT( timeMgr != 0 );
}