#include "se/ContactInfoResponse.hpp" #include "se/IntPostalInfo.hpp" #include "se/CLTRID.hpp" #include "se/EPPDateFormatter.hpp" #include "xml/XMLParser.hpp" #include "session/Timer.hpp" #include "common/init.hpp" #include "common/Test.hpp" #include using namespace std; void doWork() { init("./etc/toolkit2.conf"); const string xml( "Command completed successfullysh8013SH8013-REPJohn DoeExample Inc.123 Example Dr.Suite 100DullesVA20166-6503US+1.7035555555+1.7035555556jdoe@example.comClientYClientX1999-04-03T22:00:00.0ZClientX1999-12-03T09:00:00.0Z2000-04-08T09:00:00.0Z2fooBARABC-1234554322-XYZ"); ContactInfoResponse response; XMLParser parser; std::auto_ptr doc(parser.parse(xml)); response.fromXML(doc.get()); { vector streets = response.getIntPostalInfo().getStreet(); ASSERT_EQ(streets[0], "123 Example Dr."); } } int main(int argc, char* argv[]) { TEST_run(doWork); return TEST_errorCount(); }