#include "se/ContactCheckCommand.hpp" #include "se/CLTRID.hpp" #include "session/Timer.hpp" #include "common/Test.hpp" #include "common/init.hpp" using namespace std; void doWork() { init("./etc/toolkit2.conf"); { Timer::setTime("20070101.010101"); CLTRID::setClID("JTKUTEST"); auto_ptr cmd(new ContactCheckCommand("JTKCON")); const string xml(cmd->toXML()); ASSERT_EQ(xml, "JTKCONJTKUTEST.20070101.010101.0"); } { Timer::setTime("20070101.010101"); CLTRID::setClID("JTKUTEST"); vector ids; ids.push_back("JTKCON1"); ids.push_back("JTKCON2"); auto_ptr cmd(new ContactCheckCommand(ids)); const string xml(cmd->toXML()); ASSERT_EQ(xml, "JTKCON1JTKCON2JTKUTEST.20070101.010101.0"); } } int main(int argc, char* argv[]) { TEST_run(doWork); return TEST_errorCount(); }