ServidorTFG/tests.cpp

23 lines
641 B
C++
Raw Normal View History

2020-05-08 12:43:46 +02:00
#include "tests.h"
void test_basic::setUp(){
this->conf=new config_reader("config");
}
void test_basic::testInitial(){
std::string res;
CPPUNIT_ASSERT(true==this->conf->get_param("port",res));
CPPUNIT_ASSERT("4433"==res);
}
void test_basic::pass_tests(){
CPPUNIT_NS::TestResult testresult;
CPPUNIT_NS::TestResultCollector collectedresults;
testresult.addListener (&collectedresults);
CPPUNIT_NS::BriefTestProgressListener progress;
testresult.addListener (&progress);
CPPUNIT_NS::TestRunner testrunner;
testrunner.addTest (CPPUNIT_NS::TestFactoryRegistry::getRegistry().makeTest ());
testrunner.run(testresult);
}