2013-12-31 19:36:07 +00:00
|
|
|
#include "se/ContactCheckCommand.hpp"
|
|
|
|
#include "se/AuDomainModifyRegistrantCommand.hpp"
|
|
|
|
#include "se/CLTRID.hpp"
|
|
|
|
#include "session/Timer.hpp"
|
|
|
|
#include "common/init.hpp"
|
|
|
|
#include "common/Test.hpp"
|
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
void doWork()
|
|
|
|
{
|
2014-01-16 20:28:52 +00:00
|
|
|
init("./etc/toolkit2.conf");
|
2013-12-31 19:36:07 +00:00
|
|
|
|
|
|
|
const string registrantName = "AusRegistry";
|
|
|
|
const string registrantID = "01241326211";
|
|
|
|
const string registrantIDType = "ACN";
|
|
|
|
const string eligibilityType = "Company";
|
|
|
|
const int policyReason = 1;
|
|
|
|
const string eligibilityName = "Blah";
|
|
|
|
const string eligibilityID = "1231239523";
|
|
|
|
const string eligibilityIDType = "OTHER";
|
|
|
|
|
|
|
|
{
|
2014-01-18 20:35:18 +00:00
|
|
|
Timer::setTime("20140101.010101");
|
2013-12-31 19:36:07 +00:00
|
|
|
CLTRID::setClID("JTKUTEST");
|
|
|
|
|
|
|
|
AuDomainModifyRegistrantCommand cmd(
|
|
|
|
"jtkutest.com.au",
|
|
|
|
registrantName,
|
|
|
|
"testing",
|
|
|
|
&eligibilityType,
|
|
|
|
policyReason,
|
|
|
|
®istrantID,
|
|
|
|
®istrantIDType,
|
|
|
|
&eligibilityName,
|
|
|
|
&eligibilityID,
|
|
|
|
&eligibilityIDType);
|
|
|
|
const string xml(cmd.toXML());
|
2014-01-18 20:35:18 +00:00
|
|
|
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><update><update xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name></update></update><extension><update xmlns=\"urn:X-au:params:xml:ns:auext-1.1\" xsi:schemaLocation=\"urn:X-au:params:xml:ns:auext-1.1 auext-1.1.xsd\"><auProperties><registrantName>AusRegistry</registrantName><registrantID type=\"ACN\">01241326211</registrantID><eligibilityType>Company</eligibilityType><eligibilityName>Blah</eligibilityName><eligibilityID type=\"OTHER\">1231239523</eligibilityID><policyReason>1</policyReason></auProperties><explanation>testing</explanation></update></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
|
2013-12-31 19:36:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
int main(int argc, char* argv[])
|
|
|
|
{
|
|
|
|
TEST_run(doWork);
|
|
|
|
return TEST_errorCount();
|
|
|
|
}
|
|
|
|
|