#include "common/init.hpp" #include "common/Test.hpp" #include "se/CLTRID.hpp" #include "se/ContactInfoCommand.hpp" #include "session/Timer.hpp" #include using namespace std; void doWork() { init("./etc/toolkit2.conf"); { CLTRID::setClID("JTKUTEST"); Timer::setTime("20140101.010101"); ContactInfoCommand cmd("C100000-AR"); const string xml(cmd.toXML()); ASSERT_EQ(xml, "C100000-ARJTKUTEST.20140101.010101.0"); } { CLTRID::setClID("JTKUTEST"); Timer::setTime("20140101.010101"); ContactInfoCommand cmd("C100000-AR", "jtkUT3st"); const string xml(cmd.toXML()); ASSERT_EQ(xml, "C100000-ARjtkUT3stJTKUTEST.20140101.010101.0"); } } int main(int argc, char* argv[]) { TEST_run(doWork); return TEST_errorCount(); }