ApplicationTest.cpp
812 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#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 );
}