This commit is contained in:
Ren RenJuan 2014-01-21 23:01:41 +00:00
parent 712f5e7707
commit 85e0bb4fb6
93 changed files with 485 additions and 1835 deletions

View File

@ -116,7 +116,7 @@ $(BUILD_OBJ_DIR)/%: $(BUILD_OBJ_DIR)/%.o
# The toolkit raises the c++ "static initialization fiasco" situation.
#
ARTKOBJS= build/XMLGregorianCalendar.o build/XMLParser.o build/XMLWriter.o build/ACSession.o build/DomainAddRem.o build/EnumDomainInfoResponse.o build/log.o build/PostalInfoType.o build/SessionManagerPropertiesImpl.o \
build/RegistrantObjectType.o \
build/RegistrantObjectType.o build/mdLogger.o \
build/AddRemType.o build/DomainCheckResponse.o build/EnumDomainUpdateCommand.o build/LPECheckResponse.o build/Properties.o build/SessionPoolImpl.o \
build/boolean.o build/DomainCreateCommand.o build/EnumType.o build/LPECreateCommand.o build/ProtocolExtensionCommand.o build/SSLException.o \
build/CertificateUserMismatchException.o build/DomainCreateResponse.o build/EPPDateFormatter.o build/LPECreateResponse.o build/ReceiveSE.o build/StandardCommandType.o \

View File

@ -1,20 +1,20 @@
#ifndef __LPE_CHECK_COMMAND_HPP
#define __LPE_CHECK_COMMAND_HPP
#ifndef __LPEDOMAIN_CHECK_COMMAND_HPP
#define __LPEDOMAIN_CHECK_COMMAND_HPP
#include "se/CheckCommand.hpp"
#include "se/DomainCheckCommand.hpp"
#include "se/StandardObjectType.hpp"
#include <string>
#include <vector>
/**
* A LPECheckCommand is used to check the availability of domain objects
* A DomainCheckCommand is used to check the availability of domain objects
* in a Registry. Instances of this class generate RFC3730 and RFC3731
* compliant domain check EPP command service elements via the toXML method.
*
* @see LPECheckResponse
* @see DomainCheckResponse
*/
class LPECheckCommand : public CheckCommand
class LPECheckCommand : public DomainCheckCommand
{
public:
/**
@ -23,7 +23,7 @@ public:
* @param name The name of the domain to check the availability of.
*/
LPECheckCommand (const std::string &name)
: CheckCommand (StandardObjectType::DOMAIN(), name) {};
: DomainCheckCommand ( name) {};
/**
* Check the availability of at least one domain.
@ -31,7 +31,7 @@ public:
* @param names The names of the domains to check the availability of.
*/
LPECheckCommand (std::vector<std::string> &names)
: CheckCommand (StandardObjectType::DOMAIN(), names) {};
: DomainCheckCommand ( names) {};
};
#endif // __DOMAIN_CHECK_COMMAND_HPP
#endif // __LPEDOMAIN_CHECK_COMMAND_HPP

View File

@ -12,7 +12,7 @@ void doWork()
{
init("./etc/toolkit2.conf");
{
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
Timer::setTime("20140101.010101");
LPECheckCommand cmd("test-andvalidate.claimsgafour");
@ -20,12 +20,12 @@ void doWork()
ASSERT_EQ(cmd.getCommandType()->getCommandName(), "check");
ASSERT_EQ(cmd.getObjectType()->getName(), "domain");
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><check><check xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>test-andvalidate.claimsgafour</name></check></check><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
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><check><check xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>test-andvalidate.claimsgafour</name></check></check><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
}
}
int main(int argc, char* argv[])
{
{ int i=0;
TEST_run(doWork);
return TEST_errorCount();
}

View File

@ -1,54 +1,15 @@
#include "se/StandardObjectType.hpp"
#include "xml/XMLHelper.hpp"
#include "OTE/OteExtension.hpp"
#include "OTE/LPECreateCommand.hpp"
#include "se/CommandExtension.hpp"
LPECreateCommand::LPECreateCommand (const std::string& name,
const std::string& pw,
const std::string* registrantID,
const std::vector<std::string>* techContacts,
const std::vector<std::string>* nameservers,
const std::vector<std::string>* adminContacts,
const std::vector<std::string>* billingContacts,
const Period* period)
: CreateCommand(StandardObjectType::DOMAIN(), name)
void LPECreateCommand::addToCommand(const Command &command) const
{
std::vector<std::string>::const_iterator p;
XMLWriter* xmlWriter = command.getXmlWriter();
DOMElement* extensionElement = command.getExtensionElement();
DOMElement* createElement = xmlWriter->appendChild(extensionElement,
"create", OteExtension().getURI());
if (period)
period->appendPeriod (xmlWriter, objElement);
if (nameservers)
{
DOMElement *ns = xmlWriter->appendChild (objElement, "ns");
for (p = nameservers->begin(); p != nameservers->end(); p++)
XMLHelper::setTextContent
(xmlWriter->appendChild (ns, "hostObj"), *p);
}
if (registrantID)
{
XMLHelper::setTextContent
(xmlWriter->appendChild(objElement, "registrant"), *registrantID);
}
if (adminContacts)
for (p = adminContacts->begin(); p != adminContacts->end(); p++)
xmlWriter->appendChild(objElement, "contact", *p, "type", "admin");
if (techContacts)
for (p = techContacts->begin(); p != techContacts->end(); p++)
xmlWriter->appendChild(objElement, "contact", *p, "type", "tech");
if (billingContacts)
for (p = billingContacts->begin(); p != billingContacts->end(); p++)
xmlWriter->appendChild(objElement, "contact", *p, "type", "billing");
XMLHelper::setTextContent
(xmlWriter->appendChild
(xmlWriter->appendChild
(objElement,
"authInfo"),
"pw"),
pw);
int a = 0;
}

View File

@ -1,9 +1,10 @@
#ifndef __LPECREATECOMMAND_HPP
#define __LPECREATECOMMAND_HPP
#define OTEADT void
#include "se/CreateCommand.hpp"
#include "se/Period.hpp"
#include "se/DomainCreateCommand.hpp"
#include "se/CommandExtension.hpp"
class LPECreateCommand;
/**
* Mapping of EPP urn:ietf:params:xml:ns:domain-1.0 create command specified in
* RFC3731. Command-response extensions to the domain:create command are
@ -12,7 +13,7 @@
* input parameters. The toXML method in Command serialises this object to
* XML.
*/
class LPECreateCommand : public CreateCommand
class LPECreateCommand : public DomainCreateCommand, public CommandExtension
{
public:
/**
@ -26,7 +27,12 @@ public:
const std::vector<std::string>* nameservers = NULL,
const std::vector<std::string>* adminContacts = NULL,
const std::vector<std::string>* billingContacts = NULL,
const Period* period = NULL);
const Period* period = NULL) :
DomainCreateCommand(name, pw, registrantID, techContacts, nameservers,
adminContacts, billingContacts, period), CommandExtension(){}
virtual void addToCommand(const Command &command) const;
void setCreateData(OTEADT* createData);
};
#endif // __LPECREATECOMMAND_HPP

View File

@ -27,16 +27,16 @@ void doWork()
*/
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
vector<string> techIds;
techIds.push_back("JTKCON2");
string registrant("JTKCON");
OteLPECreateCommand cmd("jtkutest.co.ae", "jtkUT3st", &registrant, &techIds,
OteLPECreateCommand cmd("ACTKUTST.co.ae", "jtkUT3st", &registrant, &techIds,
eligibilityType, policyReason, registrantName);
const string xml(cmd.toXML());
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><create><create 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.co.ae</name><registrant>JTKCON</registrant><contact type=\"tech\">JTKCON2</contact><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:X-ae:params:xml:ns:aeext-1.0\" xsi:schemaLocation=\"urn:X-ae:params:xml:ns:aeext-1.0 aeext-1.0.xsd\"><aeProperties><registrantName>AusRegistry</registrantName><eligibilityType>Trade License (IT)</eligibilityType><policyReason>1</policyReason></aeProperties></create></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
"<?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><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>ACTKUTST.co.ae</name><registrant>JTKCON</registrant><contact type=\"tech\">JTKCON2</contact><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:X-ae:params:xml:ns:aeext-1.0\" xsi:schemaLocation=\"urn:X-ae:params:xml:ns:aeext-1.0 aeext-1.0.xsd\"><aeProperties><registrantName>AusRegistry</registrantName><eligibilityType>Trade License (IT)</eligibilityType><policyReason>1</policyReason></aeProperties></create></extension><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
}
/**
@ -47,7 +47,7 @@ void doWork()
*/
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
vector<string> techIds;
techIds.push_back("JTKCON2");
@ -65,7 +65,7 @@ void doWork()
Period period(48, PeriodUnit::MONTHS());
OteLPECreateCommand cmd(
"jtkutest.co.ae", "jtkUT3st", &registrant,
"ACTKUTST.co.ae", "jtkUT3st", &registrant,
&techIds, &adminContacts,
NULL, &nameServers, &period,
eligibilityType, policyReason,
@ -73,7 +73,7 @@ void doWork()
&registrantIDType, &eligibilityName,
&eligibilityID, &eligibilityIDType);
const string xml(cmd.toXML());
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><create><create 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.co.ae</name><period unit=\"m\">48</period><ns><hostObj>ns1.ausregistry.net</hostObj><hostObj>ns2.ausregistry.net</hostObj></ns><registrant>JTKCON</registrant><contact type=\"admin\">JTKCON</contact><contact type=\"admin\">JTKCON2</contact><contact type=\"tech\">JTKCON2</contact><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:X-ae:params:xml:ns:aeext-1.0\" xsi:schemaLocation=\"urn:X-ae:params:xml:ns:aeext-1.0 aeext-1.0.xsd\"><aeProperties><registrantName>AusRegistry</registrantName><registrantID type=\"Trade License\">01241326211</registrantID><eligibilityType>Trade License (IT)</eligibilityType><eligibilityName>Blah</eligibilityName><eligibilityID type=\"Trademark\">1231239523</eligibilityID><policyReason>1</policyReason></aeProperties></create></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
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><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>ACTKUTST.co.ae</name><period unit=\"m\">48</period><ns><hostObj>ns1.ausregistry.net</hostObj><hostObj>ns2.ausregistry.net</hostObj></ns><registrant>JTKCON</registrant><contact type=\"admin\">JTKCON</contact><contact type=\"admin\">JTKCON2</contact><contact type=\"tech\">JTKCON2</contact><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:X-ae:params:xml:ns:aeext-1.0\" xsi:schemaLocation=\"urn:X-ae:params:xml:ns:aeext-1.0 aeext-1.0.xsd\"><aeProperties><registrantName>AusRegistry</registrantName><registrantID type=\"Trade License\">01241326211</registrantID><eligibilityType>Trade License (IT)</eligibilityType><eligibilityName>Blah</eligibilityName><eligibilityID type=\"Trademark\">1231239523</eligibilityID><policyReason>1</policyReason></aeProperties></create></extension><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -16,7 +16,7 @@ static std::string pname;
void ErrorPkg::init() throw (PropertyConfigException)
{
pname = "com.ausregistry.cpptoolkit";
pname = "biz.meansofproduction.dnseppus";
try
{
string msgsFile = SystemProperties::getProperty("epp.client.messages.file");

View File

@ -9,7 +9,7 @@ namespace {
void SystemProperties::init(const string& file)
{
//static string name = "com.ausregistry.cpptoolkit";
//static string name = "biz.meansofproduction.dnseppus";
properties.load(file);
}

View File

@ -15,7 +15,7 @@
#include "xml/XMLInit.hpp"
#include <xercesc/util/PlatformUtils.hpp>
#include <xalanc/XalanTransformer/XalanTransformer.hpp>
#include "common/init.hpp"
#include <iostream>
#include <signal.h>
#define MDLOG_USER

View File

@ -1,84 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="urn:X-ae:params:xml:ns:aedomain-1.0"
xmlns:aeDomain="urn:X-ae:params:xml:ns:aedomain-1.0"
xmlns:eppcom="urn:ietf:params:xml:ns:eppcom-1.0"
xmlns:domain="urn:ietf:params:xml:ns:domain-1.0"
xmlns:aeext="urn:X-ae:params:xml:ns:aeext-1.0"
xmlns="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<!--
Import common element types.
-->
<import namespace="urn:ietf:params:xml:ns:eppcom-1.0"
schemaLocation="eppcom-1.0.xsd"/>
<import namespace="urn:ietf:params:xml:ns:domain-1.0"
schemaLocation="domain-1.0.xsd"/>
<import namespace="urn:X-ae:params:xml:ns:aeext-1.0" schemaLocation="aeext-1.0.xsd"/>
<annotation>
<documentation>
.ae Domain Extensions to the Extensible
Provisioning Protocol v1.0. schema.
</documentation>
</annotation>
<!--
Protocol extension framework command elements.
-->
<element name="registrantTransfer"
type="aeDomain:registrantTransferType"/>
<!--
Protocol extension framework response elements.
-->
<element name="rtrnData" type="aeDomain:rtrnDataType"/>
<!--
Type definitions.
-->
<complexType name="registrantTransferType">
<sequence>
<element name="name" type="eppcom:labelType" minOccurs="1"/>
<element name="curExpDate" type="date" minOccurs="1"/>
<element name="period" type="domain:periodType" minOccurs="0"/>
<element name="aeProperties" type="aeDomain:aePropertiesType"
minOccurs="1"/>
<element name="explanation" type="aeext:explanationType"
minOccurs="1"/>
</sequence>
</complexType>
<!--
the .ae extension domain properties
-->
<complexType name="aePropertiesType">
<sequence>
<element name="registrantName" type="eppcom:labelType"
minOccurs="1"/>
<element name="registrantID" type="aeext:registrantIDType"
minOccurs="0"/>
<element name="eligibilityType" type="aeext:eligType"
minOccurs="1"/>
<element name="eligibilityName" type="eppcom:labelType"
minOccurs="0"/>
<element name="eligibilityID" type="aeext:eligibilityIDType"
minOccurs="0"/>
<element name="policyReason" type="aeext:policyNumType"
minOccurs="0"/>
</sequence>
</complexType>
<complexType name="rtrnDataType">
<sequence>
<element name="name" type="eppcom:labelType" minOccurs="1"/>
<element name="exDate" type="dateTime" minOccurs="0"/>
</sequence>
</complexType>
<!--
End of schema.
-->
</schema>

View File

@ -1,196 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="urn:X-ae:params:xml:ns:aeext-1.0"
xmlns:aeext="urn:X-ae:params:xml:ns:aeext-1.0"
xmlns:eppcom="urn:ietf:params:xml:ns:eppcom-1.0"
xmlns:epp="urn:ietf:params:xml:ns:epp-1.0"
xmlns="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<!--
Import common element types.
-->
<import namespace="urn:ietf:params:xml:ns:eppcom-1.0" schemaLocation="eppcom-1.0.xsd"/>
<import namespace="urn:ietf:params:xml:ns:epp-1.0" schemaLocation="epp-1.0.xsd"/>
<annotation>
<documentation>
.ae Extensions to the
Extensible Provisioning Protocol v1.0 schema.
</documentation>
</annotation>
<!--
Protocol extension framework elements.
-->
<element name="command" type="aeext:commandType"/>
<!--
Protocol extension type definitions.
-->
<complexType name="commandType">
<sequence>
<choice>
<element name="registrantTransfer" type="epp:readWriteType"/>
</choice>
<element name="clTRID" type="epp:trIDStringType"
minOccurs="0"/>
</sequence>
</complexType>
<!--
Command-response framework extension elements.
-->
<element name="create" type="aeext:createType"/>
<element name="update" type="aeext:updateType"/>
<element name="infData" type="aeext:infDataType"/>
<!--
.ae update command extension
-->
<complexType name="updateType">
<sequence>
<element name="aeProperties" type="aeext:aePropertiesType"
minOccurs="1"/>
<element name="explanation" type="aeext:explanationType"
minOccurs="1"/>
</sequence>
</complexType>
<!--
.ae create command extension
-->
<complexType name="createType">
<sequence>
<element name="aeProperties" type="aeext:aePropertiesType"
minOccurs="1"/>
</sequence>
</complexType>
<!--
.ae info response extension
-->
<complexType name="infDataType">
<sequence>
<element name="aeProperties" type="aeext:aePropertiesType"
minOccurs="1"/>
</sequence>
</complexType>
<!--
the .ae extension domain properties
-->
<complexType name="aePropertiesType">
<sequence>
<element name="registrantName" type="eppcom:labelType"
minOccurs="1"/>
<element name="registrantID" type="aeext:registrantIDType"
minOccurs="0"/>
<element name="eligibilityType" type="aeext:eligType"
minOccurs="1"/>
<element name="eligibilityName" type="eppcom:labelType"
minOccurs="0"/>
<element name="eligibilityID" type="aeext:eligibilityIDType"
minOccurs="0"/>
<element name="policyReason" type="aeext:policyNumType" minOccurs="0"/>
</sequence>
</complexType>
<!--
the explanation type
-->
<simpleType name="explanationType">
<restriction base="normalizedString">
<maxLength value="1000"/>
</restriction>
</simpleType>
<!--
registrant id type is used for registrantID
-->
<complexType name="registrantIDType">
<simpleContent>
<extension base="eppcom:labelType">
<attribute name="type" type="aeext:registrantAEIdType"
use="required"/>
</extension>
</simpleContent>
</complexType>
<!--
eligibility id type is used for eligibilityID
-->
<complexType name="eligibilityIDType">
<simpleContent>
<extension base="eppcom:labelType">
<attribute name="type" type="aeext:eligibilityAEIdType"
use="required"/>
</extension>
</simpleContent>
</complexType>
<!--
enumeration of valid registrant ID types for the .ae namespace
-->
<simpleType name="registrantAEIdType">
<restriction base="token">
<enumeration value="Trade License"/>
</restriction>
</simpleType>
<!--
enumeration of valid eligibility ID types for the .ae namespace
-->
<simpleType name="eligibilityAEIdType">
<restriction base="token">
<enumeration value="Trademark"/>
</restriction>
</simpleType>
<!--
enumeration of valid Eligibility Types for the .ae namespace
-->
<simpleType name="eligType">
<restriction base="token">
<enumeration value="Trade License"/>
<enumeration value="Freezone Trade License"/>
<enumeration value="Trademark"/>
<enumeration value="Freezone Trademark"/>
<enumeration value="Trade License (IT)"/>
<enumeration value="Freezone Trade License (IT)"/>
<enumeration value="Trademark (IT)"/>
<enumeration value="Freezone Trademark (IT)"/>
<enumeration value="Legacy"/>
<enumeration value="Legacy - Approved"/>
<enumeration value="Citizen"/>
<enumeration value="Permanent Resident"/>
<enumeration value="Sporting Organisation"/>
<enumeration value="Charitable Organisation"/>
<enumeration value="Religious Organisation"/>
<enumeration value="University"/>
<enumeration value="Technical College"/>
<enumeration value="School"/>
<enumeration value="Academy"/>
<enumeration value="Government Approved"/>
</restriction>
</simpleType>
<!--
Policy reason numbers are left unassigned to a meaning to promote
flexibility of policy application. The range is also left more
open than is strictly known at the time of writing in order to
reduce the need for redistribution of an updated version of this
schema should the supported policy numbers change at some time in
the future.
-->
<simpleType name="policyNumType">
<restriction base="integer">
<minInclusive value="1"/>
<maxInclusive value="99"/>
</restriction>
</simpleType>
<!--
End of schema.
-->
</schema>

View File

@ -1,79 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="urn:X-ar:params:xml:ns:ardomain-1.0"
xmlns:arDomain="urn:X-ar:params:xml:ns:ardomain-1.0"
xmlns:eppcom="urn:ietf:params:xml:ns:eppcom-1.0"
xmlns="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<!--
Import common element types.
-->
<import namespace="urn:ietf:params:xml:ns:eppcom-1.0" schemaLocation="eppcom-1.0.xsd"/>
<annotation>
<documentation>
AusRegistry Domain Extensions to the Extensible
Provisioning Protocol v1.0. schema.
</documentation>
</annotation>
<!--
Protocol extension framework command elements.
-->
<element name="unrenew" type="arDomain:unrenewType"/>
<element name="undelete" type="arDomain:undeleteType"/>
<element name="policyDelete" type="arDomain:policyDeleteType"/>
<element name="policyUndelete" type="arDomain:policyUndeleteType"/>
<!--
Protocol extension framework response elements.
-->
<element name="urenData" type="arDomain:urenDataType"/>
<!--
Type definitions.
-->
<complexType name="unrenewType">
<sequence>
<element name="name" type="eppcom:labelType"/>
<element name="curExpDate" type="date"/>
</sequence>
</complexType>
<complexType name="undeleteType">
<sequence>
<element name="name" type="eppcom:labelType"/>
</sequence>
</complexType>
<complexType name="policyDeleteType">
<sequence>
<element name="name" type="eppcom:labelType"/>
<element name="reason" type="arDomain:reasonType"/>
</sequence>
</complexType>
<simpleType name="reasonType">
<restriction base="normalizedString">
<maxLength value="1000"/>
</restriction>
</simpleType>
<complexType name="policyUndeleteType">
<sequence>
<element name="name" type="eppcom:labelType"/>
</sequence>
</complexType>
<complexType name="urenDataType">
<sequence>
<element name="name" type="eppcom:labelType" minOccurs="1"/>
<element name="exDate" type="dateTime" minOccurs="0"/>
</sequence>
</complexType>
<!--
End of schema.
-->
</schema>

View File

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="urn:X-ar:params:xml:ns:arext-1.0"
xmlns:arext="urn:X-ar:params:xml:ns:arext-1.0"
xmlns:eppcom="urn:ietf:params:xml:ns:eppcom-1.0"
xmlns:epp="urn:ietf:params:xml:ns:epp-1.0"
xmlns="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<import namespace="urn:ietf:params:xml:ns:eppcom-1.0"
schemaLocation="eppcom-1.0.xsd"/>
<import namespace="urn:ietf:params:xml:ns:epp-1.0"
schemaLocation="epp-1.0.xsd"/>
<element name="command" type="arext:commandType"/>
<complexType name="commandType">
<sequence>
<choice>
<element name="unrenew" type="epp:readWriteType"/>
<element name="undelete" type="epp:readWriteType"/>
<element name="policyDelete" type="epp:readWriteType"/>
<element name="policyUndelete" type="epp:readWriteType"/>
</choice>
<element name="clTRID" type="epp:trIDStringType"/>
</sequence>
</complexType>
</schema>

View File

@ -1,72 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="urn:X-au:params:xml:ns:audomain-1.0"
xmlns:auDomain="urn:X-au:params:xml:ns:audomain-1.0"
xmlns:eppcom="urn:ietf:params:xml:ns:eppcom-1.0"
xmlns:domain="urn:ietf:params:xml:ns:domain-1.0"
xmlns:auext="urn:X-au:params:xml:ns:auext-1.1"
xmlns="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<!--
Import common element types.
-->
<import namespace="urn:ietf:params:xml:ns:eppcom-1.0" schemaLocation="eppcom-1.0.xsd"/>
<import namespace="urn:ietf:params:xml:ns:domain-1.0" schemaLocation="domain-1.0.xsd"/>
<import namespace="urn:X-au:params:xml:ns:auext-1.1" schemaLocation="auext-1.1.xsd"/>
<annotation>
<documentation>
.au Domain Extensions to the Extensible
Provisioning Protocol v1.0. schema.
</documentation>
</annotation>
<!--
Protocol extension framework command elements.
-->
<element name="registrantTransfer" type="auDomain:registrantTransferType"/>
<!--
Protocol extension framework response elements.
-->
<element name="rtrnData" type="auDomain:rtrnDataType"/>
<!--
Type definitions.
-->
<complexType name="registrantTransferType">
<sequence>
<element name="name" type="eppcom:labelType" minOccurs="1"/>
<element name="curExpDate" type="date" minOccurs="1"/>
<element name="period" type="domain:periodType" minOccurs="0"/>
<element name="auProperties" type="auDomain:auPropertiesType" minOccurs="1"/>
<element name="explanation" type="auext:explanationType" minOccurs="1"/>
</sequence>
</complexType>
<!--
the .au extension domain properties
-->
<complexType name="auPropertiesType">
<sequence>
<element name="registrantName" type="eppcom:labelType" minOccurs="1"/>
<element name="registrantID" type="auext:registrantIDType" minOccurs="0"/>
<element name="eligibilityType" type="auext:eligType" minOccurs="1"/>
<element name="eligibilityName" type="eppcom:labelType" minOccurs="0"/>
<element name="eligibilityID" type="auext:eligibilityIDType" minOccurs="0"/>
<element name="policyReason" type="auext:policyNumType" minOccurs="1"/>
</sequence>
</complexType>
<complexType name="rtrnDataType">
<sequence>
<element name="name" type="eppcom:labelType" minOccurs="1"/>
<element name="exDate" type="dateTime" minOccurs="1"/>
</sequence>
</complexType>
<!--
End of schema.
-->
</schema>

View File

@ -1,176 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="urn:au:params:xml:ns:auext-1.0"
xmlns:auext="urn:au:params:xml:ns:auext-1.0"
xmlns:eppcom="urn:ietf:params:xml:ns:eppcom-1.0"
xmlns="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<!--
Import common element types.
-->
<import namespace="urn:ietf:params:xml:ns:eppcom-1.0"
schemaLocation="eppcom-1.0.xsd"/>
<annotation>
<documentation>
.au Extensions to the Extensible Provisioning Protocol v1.0.
schema.
</documentation>
</annotation>
<!--
au element for use in the extensions tag
-->
<element name="extensionAU" type="auext:extensionAU_type"/>
<complexType name="extensionAU_type">
<choice>
<element name="update" type="auext:extensionAUUpdate_type"/>
<element name="create" type="auext:extensionAUCreate_type"/>
<element name="info" type="auext:extensionAUInfo_type"/>
</choice>
</complexType>
<!--
.au update command extension
-->
<complexType name="extensionAUUpdate_type">
<sequence>
<element name="registrantName" type="eppcom:labelType" minOccurs="1"/>
</sequence>
</complexType>
<!--
.au create command extension
-->
<complexType name="extensionAUCreate_type">
<sequence>
<element name="registrantName" type="eppcom:labelType" minOccurs="1"/>
<element name="registrantID" type="auext:registrantIDType" minOccurs="0"/>
<element name="eligibilityType" type="auext:eligType" minOccurs="1"/>
<element name="eligibilityName" type="eppcom:labelType" minOccurs="0"/>
<element
name="eligibilityID" type="auext:eligibilityIDType" minOccurs="0"/>
<element name="policyReason" type="auext:policyNumType" minOccurs="1"/>
</sequence>
</complexType>
<!--
.au info response extension
-->
<complexType name="extensionAUInfo_type">
<sequence>
<element name="registrantName" type="eppcom:labelType" minOccurs="1"/>
<element name="registrantID" type="auext:registrantIDType" minOccurs="0"/>
<element name="eligibilityType" type="auext:eligType" minOccurs="1"/>
<element name="eligibilityName" type="eppcom:labelType" minOccurs="0"/>
<element
name="eligibilityID" type="auext:eligibilityIDType" minOccurs="0"/>
<element name="policyReason" type="auext:policyNumType" minOccurs="1"/>
</sequence>
</complexType>
<!--
registrant id type is used for registrantID
-->
<complexType name="registrantIDType">
<simpleContent>
<extension base="eppcom:labelType">
<attribute
name="type" type="auext:registrant_au_idType" use="required"/>
</extension>
</simpleContent>
</complexType>
<!--
eligibility id type is used for eligibilityID
-->
<complexType name="eligibilityIDType">
<simpleContent>
<extension base="eppcom:labelType">
<attribute
name="type" type="auext:eligibility_au_idType" use="required"/>
</extension>
</simpleContent>
</complexType>
<!--
enumeration of valid registrant ID types for the .au namespace
-->
<simpleType name="registrant_au_idType">
<restriction base="token">
<enumeration value="ACN"/>
<enumeration value="ABN"/>
<enumeration value="OTHER"/>
</restriction>
</simpleType>
<!--
enumeration of valid eligibility ID types for the .au namespace
-->
<simpleType name="eligibility_au_idType">
<restriction base="token">
<enumeration value="ACN"/>
<enumeration value="ABN"/>
<enumeration value="VIC BN"/>
<enumeration value="NSW BN"/>
<enumeration value="SA BN"/>
<enumeration value="NT BN"/>
<enumeration value="WA BN"/>
<enumeration value="TAS BN"/>
<enumeration value="ACT BN"/>
<enumeration value="QLD BN"/>
<enumeration value="TM"/>
<enumeration value="OTHER"/>
</restriction>
</simpleType>
<!--
enumeration of valid Eligibility Types for the .au namespace
-->
<simpleType name="eligType">
<restriction base="token">
<enumeration value="Charity"/>
<enumeration value="Child Care Centre"/>
<enumeration value="Citizen/Resident"/>
<enumeration value="Club"/>
<enumeration value="Commercial Statutory Body"/>
<enumeration value="Company"/>
<enumeration value="Government School"/>
<enumeration value="Higher Education Institution"/>
<enumeration value="Incorporated Association"/>
<enumeration value="Industry Body"/>
<enumeration value="National Body"/>
<enumeration value="Non-Government School"/>
<enumeration value="Non-profit Organisation"/>
<enumeration value="Other"/>
<enumeration value="Partnership"/>
<enumeration value="Pending TM Owner"/>
<enumeration value="Political Party"/>
<enumeration value="Pre-school"/>
<enumeration value="Registered Business"/>
<enumeration value="Religious/Church Group"/>
<enumeration value="Research Organisation"/>
<enumeration value="Sole Trader"/>
<enumeration value="Trade Union"/>
<enumeration value="Trademark Owner"/>
<enumeration value="Training Organisation"/>
</restriction>
</simpleType>
<!--
policy numbers can be allocated up to 106. Less than the max number
of policy values may be valed in the .au registry. This will be handled
by registry command validation. (this is done so that a new schema does
not have to be released each time the policy reasons are modified)
-->
<simpleType name="policyNumType">
<restriction base="integer">
<minInclusive value="1"/>
<maxInclusive value="106"/>
</restriction>
</simpleType>
<!--
End of schema.
-->
</schema>

View File

@ -1,201 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="urn:X-au:params:xml:ns:auext-1.1"
xmlns:auext="urn:X-au:params:xml:ns:auext-1.1"
xmlns:eppcom="urn:ietf:params:xml:ns:eppcom-1.0"
xmlns:epp="urn:ietf:params:xml:ns:epp-1.0"
xmlns="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<!--
Import common element types.
-->
<import namespace="urn:ietf:params:xml:ns:eppcom-1.0" schemaLocation="eppcom-1.0.xsd"/>
<import namespace="urn:ietf:params:xml:ns:epp-1.0" schemaLocation="epp-1.0.xsd"/>
<annotation>
<documentation>
.au Extensions to the
Extensible Provisioning
Protocol v1.1 schema.
</documentation>
</annotation>
<!--
Protocol extension framework elements.
-->
<element name="command" type="auext:commandType"/>
<!--
Protocol extension type definitions.
-->
<complexType name="commandType">
<sequence>
<choice>
<element name="registrantTransfer" type="epp:readWriteType"/>
</choice>
<element name="clTRID" type="epp:trIDStringType" minOccurs="0"/>
</sequence>
</complexType>
<!--
Command-response framework extension elements.
-->
<element name="create" type="auext:createType"/>
<element name="update" type="auext:updateType"/>
<element name="infData" type="auext:infDataType"/>
<!--
.au update command extension
-->
<complexType name="updateType">
<sequence>
<element name="auProperties" type="auext:auPropertiesType" minOccurs="1"/>
<element name="explanation" type="auext:explanationType" minOccurs="1"/>
</sequence>
</complexType>
<!--
.au create command extension
-->
<complexType name="createType">
<sequence>
<element name="auProperties" type="auext:auPropertiesType" minOccurs="1"/>
</sequence>
</complexType>
<!--
.au info response extension
-->
<complexType name="infDataType">
<sequence>
<element name="auProperties" type="auext:auPropertiesType" minOccurs="1"/>
</sequence>
</complexType>
<!--
the .au extension domain properties
-->
<complexType name="auPropertiesType">
<sequence>
<element name="registrantName" type="eppcom:labelType" minOccurs="1"/>
<element name="registrantID" type="auext:registrantIDType" minOccurs="0"/>
<element name="eligibilityType" type="auext:eligType" minOccurs="1"/>
<element name="eligibilityName" type="eppcom:labelType" minOccurs="0"/>
<element name="eligibilityID" type="auext:eligibilityIDType" minOccurs="0"/>
<element name="policyReason" type="auext:policyNumType" minOccurs="1"/>
</sequence>
</complexType>
<!--
the explanation type
-->
<simpleType name="explanationType">
<restriction base="normalizedString">
<maxLength value="1000"/>
</restriction>
</simpleType>
<!--
registrant id type is used for registrantID
-->
<complexType name="registrantIDType">
<simpleContent>
<extension base="eppcom:labelType">
<attribute name="type" type="auext:registrantAUIdType" use="required"/>
</extension>
</simpleContent>
</complexType>
<!--
eligibility id type is used for eligibilityID
-->
<complexType name="eligibilityIDType">
<simpleContent>
<extension base="eppcom:labelType">
<attribute name="type" type="auext:eligibilityAUIdType" use="required"/>
</extension>
</simpleContent>
</complexType>
<!--
enumeration of valid registrant ID types for the .au namespace
-->
<simpleType name="registrantAUIdType">
<restriction base="token">
<enumeration value="ACN"/>
<enumeration value="ABN"/>
<enumeration value="OTHER"/>
</restriction>
</simpleType>
<!--
enumeration of valid eligibility ID types for the .au namespace
-->
<simpleType name="eligibilityAUIdType">
<restriction base="token">
<enumeration value="ACN"/>
<enumeration value="ABN"/>
<enumeration value="VIC BN"/>
<enumeration value="NSW BN"/>
<enumeration value="SA BN"/>
<enumeration value="NT BN"/>
<enumeration value="WA BN"/>
<enumeration value="TAS BN"/>
<enumeration value="ACT BN"/>
<enumeration value="QLD BN"/>
<enumeration value="TM"/>
<enumeration value="OTHER"/>
</restriction>
</simpleType>
<!--
enumeration of valid Eligibility Types for the .au namespace
-->
<simpleType name="eligType">
<restriction base="token">
<enumeration value="Charity"/>
<enumeration value="Child Care Centre"/>
<enumeration value="Citizen/Resident"/>
<enumeration value="Club"/>
<enumeration value="Commercial Statutory Body"/>
<enumeration value="Company"/>
<enumeration value="Government School"/>
<enumeration value="Higher Education Institution"/>
<enumeration value="Incorporated Association"/>
<enumeration value="Industry Body"/>
<enumeration value="National Body"/>
<enumeration value="Non-Government School"/>
<enumeration value="Non-profit Organisation"/>
<enumeration value="Other"/>
<enumeration value="Partnership"/>
<enumeration value="Pending TM Owner"/>
<enumeration value="Political Party"/>
<enumeration value="Pre-school"/>
<enumeration value="Registered Business"/>
<enumeration value="Religious/Church Group"/>
<enumeration value="Research Organisation"/>
<enumeration value="Sole Trader"/>
<enumeration value="Trade Union"/>
<enumeration value="Trademark Owner"/>
<enumeration value="Training Organisation"/>
</restriction>
</simpleType>
<!--
policy numbers can be allocated up to 106. Less than the max number
of policy values may be valed in the .au registry. This will be handled
by registry command validation. (this is done so that a new schema does
not have to be released each time the policy reasons are modified)
-->
<simpleType name="policyNumType">
<restriction base="integer">
<minInclusive value="1"/>
<maxInclusive value="106"/>
</restriction>
</simpleType>
<!--
End of schema.
-->
</schema>

View File

@ -1,103 +1,90 @@
<schema targetNamespace="urn:ietf:params:xml:ns:eppcom-1.0"
xmlns:eppcom="urn:ietf:params:xml:ns:eppcom-1.0"
xmlns="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<annotation>
<documentation>
<?xml version="1.0"?>
<schema xmlns:eppcom="urn:ietf:params:xml:ns:eppcom-1.0" xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:ietf:params:xml:ns:eppcom-1.0" elementFormDefault="qualified">
<annotation>
<documentation>
Extensible Provisioning Protocol v1.0
shared structures schema.
</documentation>
</annotation>
<!--
</annotation>
<!--
Object authorization information types.
-->
<complexType name="pwAuthInfoType">
<simpleContent>
<extension base="normalizedString">
<attribute name="roid" type="eppcom:roidType"/>
</extension>
</simpleContent>
</complexType>
<complexType name="extAuthInfoType">
<sequence>
<any namespace="##other"/>
</sequence>
</complexType>
<!--
<complexType name="pwAuthInfoType">
<simpleContent>
<extension base="normalizedString">
<attribute name="roid" type="eppcom:roidType"/>
</extension>
</simpleContent>
</complexType>
<complexType name="extAuthInfoType">
<sequence>
<any namespace="##other"/>
</sequence>
</complexType>
<!--
<check> response types.
-->
<complexType name="reasonType">
<simpleContent>
<extension base="eppcom:reasonBaseType">
<attribute name="lang" type="language"/>
</extension>
</simpleContent>
</complexType>
<simpleType name="reasonBaseType">
<restriction base="token">
<minLength value="1"/>
<maxLength value="32"/>
</restriction>
</simpleType>
<!--
<complexType name="reasonType">
<simpleContent>
<extension base="eppcom:reasonBaseType">
<attribute name="lang" type="language"/>
</extension>
</simpleContent>
</complexType>
<simpleType name="reasonBaseType">
<restriction base="token">
<minLength value="1"/>
<maxLength value="32"/>
</restriction>
</simpleType>
<!--
Abstract client and object identifier type.
-->
<simpleType name="clIDType">
<restriction base="token">
<minLength value="3"/>
<maxLength value="16"/>
</restriction>
</simpleType>
<!--
<simpleType name="clIDType">
<restriction base="token">
<minLength value="3"/>
<maxLength value="16"/>
</restriction>
</simpleType>
<!--
DNS label type.
-->
<simpleType name="labelType">
<restriction base="token">
<minLength value="1"/>
<maxLength value="255"/>
</restriction>
</simpleType>
<!--
<simpleType name="labelType">
<restriction base="token">
<minLength value="1"/>
<maxLength value="255"/>
</restriction>
</simpleType>
<!--
Non-empty token type.
-->
<simpleType name="minTokenType">
<restriction base="token">
<minLength value="1"/>
</restriction>
</simpleType>
<!--
<simpleType name="minTokenType">
<restriction base="token">
<minLength value="1"/>
</restriction>
</simpleType>
<!--
Repository Object IDentifier type.
-->
<simpleType name="roidType">
<restriction base="token">
<pattern value="(\w|_){1,80}-\w{1,8}"/>
</restriction>
</simpleType>
<!--
<simpleType name="roidType">
<restriction base="token">
<pattern value="(\w|_){1,80}-\w{1,8}"/>
</restriction>
</simpleType>
<!--
Transfer status identifiers.
-->
<simpleType name="trStatusType">
<restriction base="token">
<enumeration value="clientApproved"/>
<enumeration value="clientCancelled"/>
<enumeration value="clientRejected"/>
<enumeration value="pending"/>
<enumeration value="serverApproved"/>
<enumeration value="serverCancelled"/>
</restriction>
</simpleType>
<!--
<simpleType name="trStatusType">
<restriction base="token">
<enumeration value="clientApproved"/>
<enumeration value="clientCancelled"/>
<enumeration value="clientRejected"/>
<enumeration value="pending"/>
<enumeration value="serverApproved"/>
<enumeration value="serverCancelled"/>
</restriction>
</simpleType>
<!--
End of schema.
-->
</schema>
</schema>

View File

@ -1,174 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="urn:X-ar:params:xml:ns:idnadomain-1.0"
xmlns:idnadomain="urn:X-ar:params:xml:ns:idnadomain-1.0"
xmlns:eppcom="urn:ietf:params:xml:ns:eppcom-1.0"
xmlns="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<!--
Import common element types.
-->
<import namespace="urn:ietf:params:xml:ns:eppcom-1.0"
schemaLocation="eppcom-1.0.xsd" />
<annotation>
<documentation>
Internationalised Domain Name Extensions to the Extensible
Provisioning Protocol v1.1 schema. Domain-specific types and
attributes.
</documentation>
</annotation>
<group name="namePair">
<annotation>
<documentation>
User and DNS presentation forms of a domain
</documentation>
</annotation>
<sequence>
<element name="userForm" type="eppcom:labelType">
<annotation>
<documentation>
This should be of type internationalisedLabelType
</documentation>
</annotation>
</element>
<element name="dnsForm" type="eppcom:labelType" />
</sequence>
</group>
<!--
Child elements found in EPP commands.
-->
<element name="check" type="idnadomain:mNameType" />
<!--
Child elements of the <check> command.
-->
<complexType name="mNameType">
<sequence>
<element name="name" type="idnadomain:internationalisedLabelType"
maxOccurs="unbounded" />
</sequence>
</complexType>
<complexType name="internationalisedLabelType">
<simpleContent>
<extension base="eppcom:labelType">
<attribute name="language" type="language">
<annotation>
<documentation>
Registration of language with IANA requires the definition
of a Script or Language Designator
(http://www.iana.org/procedures/idn-repository.html).
The linked document above notes that Language Designators
are defined in BCP 47
(http://www.rfc-editor.org/rfc/bcp/bcp47.txt), which
satisfies the requirements of the language datatype and
RFC3066 (BCP 47, Section 2.2.8).
</documentation>
</annotation>
</attribute>
</extension>
</simpleContent>
</complexType>
<!--
Child response elements.
-->
<element name="chkData" type="idnadomain:chkDataType" />
<!--
<check> response elements.
-->
<complexType name="chkDataType">
<sequence>
<element name="cd" type="idnadomain:checkType"
maxOccurs="unbounded" />
</sequence>
</complexType>
<complexType name="checkType">
<sequence>
<element name="name" type="idnadomain:checkNameType" />
<element name="reason" type="eppcom:reasonType" minOccurs="0" />
</sequence>
</complexType>
<complexType name="checkNameType">
<simpleContent>
<extension base="idnadomain:internationalisedLabelType">
<attribute name="avail" type="boolean" use="required" />
</extension>
</simpleContent>
</complexType>
<!--
Custom extensions
-->
<element name="create" type="idnadomain:createType" />
<element name="info" type="idnadomain:infoType" />
<!--
Child elements of the <create> command extension.
-->
<complexType name="createType">
<attribute name="language" use="required" />
</complexType>
<!--
Child elements of the <info> command extension.
-->
<complexType name="infoType">
<attribute name="variants" type="idnadomain:variantsInfoType"
default="all" />
</complexType>
<simpleType name="variantsInfoType">
<restriction base="token">
<enumeration value="all" />
<enumeration value="none" />
</restriction>
</simpleType>
<!--
Custom response
-->
<element name="infData" type="idnadomain:resDataType" />
<element name="creData" type="idnadomain:resDataType" />
<!--
Response extension elements.
-->
<complexType name="resDataType">
<sequence>
<!-- primary is the name in domain create -->
<element name="primary" type="idnadomain:primaryType"
minOccurs="1" />
<element name="variant" type="idnadomain:variantType"
minOccurs="0" maxOccurs="unbounded" />
</sequence>
</complexType>
<complexType name="primaryType">
<annotation>
<documentation>
Should this be moved directly into the resDataType? - assumes
that userForm of namePair is of type internationalisedLabelType
</documentation>
</annotation>
<group ref="idnadomain:namePair" />
<attribute name="language" />
</complexType>
<complexType name="variantType">
<group ref="idnadomain:namePair" />
<attribute name="language" />
<attribute name="provisioned" type="boolean" default="false" />
</complexType>
<!--
End of schema.
-->
</schema>

View File

@ -1,55 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="urn:X-ar:params:xml:ns:idnahost-1.0"
xmlns:idnahost="urn:X-ar:params:xml:ns:idnahost-1.0"
xmlns:eppcom="urn:ietf:params:xml:ns:eppcom-1.0"
xmlns="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<!--
Import common element types.
-->
<import namespace="urn:ietf:params:xml:ns:eppcom-1.0"
schemaLocation="eppcom-1.0.xsd" />
<annotation>
<documentation>
Internationalised Domain Name Extensions to the Extensible
Provisioning Protocol v1.1 schema. Host-specific types and
attributes.
</documentation>
</annotation>
<group name="labelGroup">
<annotation>
<documentation>Label and optional U-label</documentation>
</annotation>
<sequence>
<element name="userForm" type="eppcom:labelType" />
<element name="dnsForm" type="eppcom:labelType" />
</sequence>
</group>
<!--
Child response elements.
-->
<element name="creData" type="idnahost:creDataType" />
<element name="infData" type="idnahost:infDataType" />
<!--
<create> response elements.
-->
<complexType name="creDataType">
<group ref="idnahost:labelGroup" />
</complexType>
<!--
<info> response elements.
-->
<complexType name="infDataType">
<group ref="idnahost:labelGroup" />
</complexType>
<!--
End of schema.
-->
</schema>

View File

@ -1,84 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="urn:X-ote:params:xml:ns:otedomain-1.0"
xmlns:oteDomain="urn:X-ote:params:xml:ns:otedomain-1.0"
xmlns:eppcom="urn:ietf:params:xml:ns:eppcom-1.0"
xmlns:domain="urn:ietf:params:xml:ns:domain-1.0"
xmlns:oteext="urn:X-ote:params:xml:ns:oteext-1.0"
xmlns="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<!--
Import common element types.
-->
<import namespace="urn:ietf:params:xml:ns:eppcom-1.0"
schemaLocation="eppcom-1.0.xsd"/>
<import namespace="urn:ietf:params:xml:ns:domain-1.0"
schemaLocation="domain-1.0.xsd"/>
<import namespace="urn:X-ote:params:xml:ns:oteext-1.0" schemaLocation="oteext-1.0.xsd"/>
<annotation>
<documentation>
.ote Domain Extensions to the Extensible
Provisioning Protocol v1.0. schema.
</documentation>
</annotation>
<!--
Protocol extension framework command elements.
-->
<element name="registrantTransfer"
type="oteDomain:registrantTransferType"/>
<!--
Protocol extension framework response elements.
-->
<element name="rtrnData" type="oteDomain:rtrnDataType"/>
<!--
Type definitions.
-->
<complexType name="registrantTransferType">
<sequence>
<element name="name" type="eppcom:labelType" minOccurs="1"/>
<element name="curExpDate" type="date" minOccurs="1"/>
<element name="period" type="domain:periodType" minOccurs="0"/>
<element name="oteProperties" type="oteDomain:otePropertiesType"
minOccurs="1"/>
<element name="explanation" type="oteext:explanationType"
minOccurs="1"/>
</sequence>
</complexType>
<!--
the .ote extension domain properties
-->
<complexType name="otePropertiesType">
<sequence>
<element name="registrantName" type="eppcom:labelType"
minOccurs="1"/>
<element name="registrantID" type="oteext:registrantIDType"
minOccurs="0"/>
<element name="eligibilityType" type="oteext:eligType"
minOccurs="1"/>
<element name="eligibilityName" type="eppcom:labelType"
minOccurs="0"/>
<element name="eligibilityID" type="oteext:eligibilityIDType"
minOccurs="0"/>
<element name="policyReason" type="oteext:policyNumType"
minOccurs="0"/>
</sequence>
</complexType>
<complexType name="rtrnDataType">
<sequence>
<element name="name" type="eppcom:labelType" minOccurs="1"/>
<element name="exDate" type="dateTime" minOccurs="0"/>
</sequence>
</complexType>
<!--
End of schema.
-->
</schema>

View File

@ -1,196 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="urn:X-ote:params:xml:ns:oteext-1.0"
xmlns:oteext="urn:X-ote:params:xml:ns:oteext-1.0"
xmlns:eppcom="urn:ietf:params:xml:ns:eppcom-1.0"
xmlns:epp="urn:ietf:params:xml:ns:epp-1.0"
xmlns="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<!--
Import common element types.
-->
<import namespace="urn:ietf:params:xml:ns:eppcom-1.0" schemaLocation="eppcom-1.0.xsd"/>
<import namespace="urn:ietf:params:xml:ns:epp-1.0" schemaLocation="epp-1.0.xsd"/>
<annotation>
<documentation>
.ote Extensions to the
Extensible Provisioning Protocol v1.0 schema.
</documentation>
</annotation>
<!--
Protocol extension framework elements.
-->
<element name="command" type="oteext:commandType"/>
<!--
Protocol extension type definitions.
-->
<complexType name="commandType">
<sequence>
<choice>
<element name="registrantTransfer" type="epp:readWriteType"/>
</choice>
<element name="clTRID" type="epp:trIDStringType"
minOccurs="0"/>
</sequence>
</complexType>
<!--
Command-response framework extension elements.
-->
<element name="create" type="oteext:createType"/>
<element name="update" type="oteext:updateType"/>
<element name="infData" type="oteext:infDataType"/>
<!--
.ote update command extension
-->
<complexType name="updateType">
<sequence>
<element name="oteProperties" type="oteext:otePropertiesType"
minOccurs="1"/>
<element name="explanation" type="oteext:explanationType"
minOccurs="1"/>
</sequence>
</complexType>
<!--
.ote create command extension
-->
<complexType name="createType">
<sequence>
<element name="oteProperties" type="oteext:otePropertiesType"
minOccurs="1"/>
</sequence>
</complexType>
<!--
.ote info response extension
-->
<complexType name="infDataType">
<sequence>
<element name="oteProperties" type="oteext:otePropertiesType"
minOccurs="1"/>
</sequence>
</complexType>
<!--
the .ote extension domain properties
-->
<complexType name="otePropertiesType">
<sequence>
<element name="registrantName" type="eppcom:labelType"
minOccurs="1"/>
<element name="registrantID" type="oteext:registrantIDType"
minOccurs="0"/>
<element name="eligibilityType" type="oteext:eligType"
minOccurs="1"/>
<element name="eligibilityName" type="eppcom:labelType"
minOccurs="0"/>
<element name="eligibilityID" type="oteext:eligibilityIDType"
minOccurs="0"/>
<element name="policyReason" type="oteext:policyNumType" minOccurs="0"/>
</sequence>
</complexType>
<!--
the explanation type
-->
<simpleType name="explanationType">
<restriction base="normalizedString">
<maxLength value="1000"/>
</restriction>
</simpleType>
<!--
registrant id type is used for registrantID
-->
<complexType name="registrantIDType">
<simpleContent>
<extension base="eppcom:labelType">
<attribute name="type" type="oteext:registrantoteIdType"
use="required"/>
</extension>
</simpleContent>
</complexType>
<!--
eligibility id type is used for eligibilityID
-->
<complexType name="eligibilityIDType">
<simpleContent>
<extension base="eppcom:labelType">
<attribute name="type" type="oteext:eligibilityoteIdType"
use="required"/>
</extension>
</simpleContent>
</complexType>
<!--
enumeration of valid registrant ID types for the .ote namespace
-->
<simpleType name="registrantoteIdType">
<restriction base="token">
<enumeration value="Trade License"/>
</restriction>
</simpleType>
<!--
enumeration of valid eligibility ID types for the .ote namespace
-->
<simpleType name="eligibilityoteIdType">
<restriction base="token">
<enumeration value="Trademark"/>
</restriction>
</simpleType>
<!--
enumeration of valid Eligibility Types for the .ote namespace
-->
<simpleType name="eligType">
<restriction base="token">
<enumeration value="Trade License"/>
<enumeration value="Freezone Trade License"/>
<enumeration value="Trademark"/>
<enumeration value="Freezone Trademark"/>
<enumeration value="Trade License (IT)"/>
<enumeration value="Freezone Trade License (IT)"/>
<enumeration value="Trademark (IT)"/>
<enumeration value="Freezone Trademark (IT)"/>
<enumeration value="Legacy"/>
<enumeration value="Legacy - Approved"/>
<enumeration value="Citizen"/>
<enumeration value="Permanent Resident"/>
<enumeration value="Sporting Organisation"/>
<enumeration value="Charitable Organisation"/>
<enumeration value="Religious Organisation"/>
<enumeration value="University"/>
<enumeration value="Technical College"/>
<enumeration value="School"/>
<enumeration value="Academy"/>
<enumeration value="Government Approved"/>
</restriction>
</simpleType>
<!--
Policy reason numbers are left unassigned to a meaning to promote
flexibility of policy application. The range is also left more
open than is strictly known at the time of writing in order to
reduce the need for redistribution of an updated version of this
schema should the supported policy numbers change at some time in
the future.
-->
<simpleType name="policyNumType">
<restriction base="integer">
<minInclusive value="1"/>
<maxInclusive value="99"/>
</restriction>
</simpleType>
<!--
End of schema.
-->
</schema>

View File

@ -11,24 +11,24 @@ void doWork()
init("./etc/toolkit2.conf");
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
auto_ptr<Command> cmd(new ContactCheckCommand("JTKCON"));
const string xml(cmd->toXML());
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><check><check xmlns=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><id>JTKCON</id></check></check><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
"<?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><check><check xmlns=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><id>JTKCON</id></check></check><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
}
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
vector<string> ids;
ids.push_back("JTKCON1");
ids.push_back("JTKCON2");
auto_ptr<Command> cmd(new ContactCheckCommand(ids));
const string xml(cmd->toXML());
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><check><check xmlns=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><id>JTKCON1</id><id>JTKCON2</id></check></check><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
"<?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><check><check xmlns=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><id>JTKCON1</id><id>JTKCON2</id></check></check><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -12,12 +12,12 @@ void doWork()
{
init("./etc/toolkit2.conf");
{
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
Timer::setTime("20140101.010101");
ContactDeleteCommand cmd("JTKCON");
const string xml(cmd.toXML());
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><delete><delete xmlns=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><id>JTKCON</id></delete></delete><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
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><delete><delete xmlns=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><id>JTKCON</id></delete></delete><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -12,20 +12,20 @@ void doWork()
{
init("./etc/toolkit2.conf");
{
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
Timer::setTime("20140101.010101");
ContactInfoCommand cmd("C100000-AR");
const string xml(cmd.toXML());
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><info><info xmlns=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><id>C100000-AR</id></info></info><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
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><info><info xmlns=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><id>C100000-AR</id></info></info><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
}
{
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
Timer::setTime("20140101.010101");
ContactInfoCommand cmd("C100000-AR", "jtkUT3st");
const string xml(cmd.toXML());
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><info><info xmlns=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><id>C100000-AR</id><authInfo><pw>jtkUT3st</pw></authInfo></info></info><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
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><info><info xmlns=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><id>C100000-AR</id><authInfo><pw>jtkUT3st</pw></authInfo></info></info><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -15,10 +15,10 @@ void doWork()
init("./etc/toolkit2.conf");
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
ContactTransferRequestCommand cmd("JTKCON1", "jtkcon1pw");
const string expected("<?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><transfer op=\"request\"><transfer xmlns=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><id>JTKCON1</id><authInfo><pw>jtkcon1pw</pw></authInfo></transfer></transfer><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
const string expected("<?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><transfer op=\"request\"><transfer xmlns=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><id>JTKCON1</id><authInfo><pw>jtkcon1pw</pw></authInfo></transfer></transfer><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
const string xml(cmd.toXML());
ASSERT_EQ(expected, xml);
}

View File

@ -12,7 +12,7 @@ void doWork()
{
init("./etc/toolkit2.conf");
{
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
Timer::setTime("20140101.010101");
DomainCheckCommand cmd("test.com.au");
@ -20,7 +20,7 @@ void doWork()
ASSERT_EQ(cmd.getCommandType()->getCommandName(), "check");
ASSERT_EQ(cmd.getObjectType()->getName(), "domain");
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><check><check xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>test.com.au</name></check></check><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
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><check><check xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>test.com.au</name></check></check><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -12,12 +12,12 @@ void doWork()
{
init("./etc/toolkit2.conf");
{
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
Timer::setTime("20140101.010101");
DomainDeleteCommand cmd("jtkutest.com.au");
DomainDeleteCommand cmd("ACTKUTST.com.au");
const string xml(cmd.toXML());
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><delete><delete 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></delete></delete><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
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><delete><delete xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>ACTKUTST.com.au</name></delete></delete><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -12,12 +12,12 @@ void doWork()
{
init("./etc/toolkit2.conf");
{
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
Timer::setTime("20140101.010101");
DomainInfoCommand cmd("jtkutest.com.au");
DomainInfoCommand cmd("ACTKUTST.com.au");
const string xml(cmd.toXML());
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><info><info 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></info></info><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
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><info><info xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>ACTKUTST.com.au</name></info></info><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -19,57 +19,57 @@ const static string policyReason = "1";
void testUpdateSingleKVList()
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
DomainKVCommandExtension extension(StandardCommandType::UPDATE());
addSampleItemsToExtension(extension, "ae");
DomainUpdateCommand updateCommand("jtkutest.com.ae");
DomainUpdateCommand updateCommand("ACTKUTST.com.ae");
updateCommand.appendExtension(extension);
const string xml = updateCommand.toXML();
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.ae</name></update></update><extension><update xmlns=\"urn:X-ar:params:xml:ns:kv-1.0\"><kvlist name=\"ae\"><item key=\"eligibilityType\">Trademark</item><item key=\"policyReason\">1</item><item key=\"registrantName\">AusRegistry</item></kvlist></update></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
"<?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>ACTKUTST.com.ae</name></update></update><extension><update xmlns=\"urn:X-ar:params:xml:ns:kv-1.0\"><kvlist name=\"ae\"><item key=\"eligibilityType\">Trademark</item><item key=\"policyReason\">1</item><item key=\"registrantName\">AusRegistry</item></kvlist></update></extension><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>"
);
}
void testCreateSingleKVList()
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
DomainKVCommandExtension extension(StandardCommandType::CREATE());
addSampleItemsToExtension(extension, "ae");
string registrant("JTKCON");
DomainCreateCommand createCommand("jtkutest.com.ae", "jtkUT3st", &registrant);
DomainCreateCommand createCommand("ACTKUTST.com.ae", "jtkUT3st", &registrant);
createCommand.appendExtension(extension);
const string xml = createCommand.toXML();
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><create><create 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.ae</name><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:X-ar:params:xml:ns:kv-1.0\"><kvlist name=\"ae\"><item key=\"eligibilityType\">Trademark</item><item key=\"policyReason\">1</item><item key=\"registrantName\">AusRegistry</item></kvlist></create></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
"<?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><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>ACTKUTST.com.ae</name><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:X-ar:params:xml:ns:kv-1.0\"><kvlist name=\"ae\"><item key=\"eligibilityType\">Trademark</item><item key=\"policyReason\">1</item><item key=\"registrantName\">AusRegistry</item></kvlist></create></extension><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>"
);
}
void testMultipleKVList()
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
DomainKVCommandExtension extension(StandardCommandType::CREATE());
addSampleItemsToExtension(extension, "ae");
addSampleItemsToExtension(extension, "au");
string registrant("JTKCON");
DomainCreateCommand createCommand("jtkutest.com.ae", "jtkUT3st", &registrant);
DomainCreateCommand createCommand("ACTKUTST.com.ae", "jtkUT3st", &registrant);
createCommand.appendExtension(extension);
const string xml = createCommand.toXML();
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><create><create 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.ae</name><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:X-ar:params:xml:ns:kv-1.0\"><kvlist name=\"ae\"><item key=\"eligibilityType\">Trademark</item><item key=\"policyReason\">1</item><item key=\"registrantName\">AusRegistry</item></kvlist><kvlist name=\"au\"><item key=\"eligibilityType\">Trademark</item><item key=\"policyReason\">1</item><item key=\"registrantName\">AusRegistry</item></kvlist></create></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
"<?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><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>ACTKUTST.com.ae</name><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:X-ar:params:xml:ns:kv-1.0\"><kvlist name=\"ae\"><item key=\"eligibilityType\">Trademark</item><item key=\"policyReason\">1</item><item key=\"registrantName\">AusRegistry</item></kvlist><kvlist name=\"au\"><item key=\"eligibilityType\">Trademark</item><item key=\"policyReason\">1</item><item key=\"registrantName\">AusRegistry</item></kvlist></create></extension><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>"
);
}

View File

@ -23,17 +23,17 @@ void addSampleKVItems(DomainRegistrantTransferCommand *command);
void testWithoutPeriod()
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
auto_ptr<DomainRegistrantTransferCommand> command(
new DomainRegistrantTransferCommand("jtkutest.com.ae", *curExpDate, kvListName, "testing"));
new DomainRegistrantTransferCommand("ACTKUTST.com.ae", *curExpDate, kvListName, "testing"));
addSampleKVItems(command.get());
const std::string xml = command->toXML();
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\"><extension><command xmlns=\"urn:X-ar:params:xml:ns:registrant-1.0\"><registrantTransfer><name>jtkutest.com.ae</name><curExpDate>"
"<?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\"><extension><command xmlns=\"urn:X-ar:params:xml:ns:registrant-1.0\"><registrantTransfer><name>ACTKUTST.com.ae</name><curExpDate>"
+ EPPDateFormatter::toXSDate(*curExpDate)
+ "</curExpDate><kvlist xmlns=\"urn:X-ar:params:xml:ns:kv-1.0\" name=\"ae\"><item key=\"eligibilityIDType\">Trademark</item><item key=\"eligibilityIDValue\">1231239523</item><item key=\"eligibilityName\">Blah</item><item key=\"eligibilityType\">Trademark</item><item key=\"policyReason\">1</item><item key=\"registrantIDType\">Trade License</item><item key=\"registrantIDValue\">01241326211</item><item key=\"registrantName\">AusRegistry</item></kvlist><explanation>testing</explanation></registrantTransfer><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></extension></epp>"
+ "</curExpDate><kvlist xmlns=\"urn:X-ar:params:xml:ns:kv-1.0\" name=\"ae\"><item key=\"eligibilityIDType\">Trademark</item><item key=\"eligibilityIDValue\">1231239523</item><item key=\"eligibilityName\">Blah</item><item key=\"eligibilityType\">Trademark</item><item key=\"policyReason\">1</item><item key=\"registrantIDType\">Trade License</item><item key=\"registrantIDValue\">01241326211</item><item key=\"registrantName\">AusRegistry</item></kvlist><explanation>testing</explanation></registrantTransfer><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></extension></epp>"
);
}
@ -41,14 +41,14 @@ void testWithPeriod()
{
Period period(2, PeriodUnit::YEARS());
auto_ptr<DomainRegistrantTransferCommand> command(
new DomainRegistrantTransferCommand("jtkutest.com.ae", *curExpDate, kvListName, "testing", &period));
new DomainRegistrantTransferCommand("ACTKUTST.com.ae", *curExpDate, kvListName, "testing", &period));
addSampleKVItems(command.get());
const std::string xml = command->toXML();
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\"><extension><command xmlns=\"urn:X-ar:params:xml:ns:registrant-1.0\"><registrantTransfer><name>jtkutest.com.ae</name><curExpDate>"
"<?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\"><extension><command xmlns=\"urn:X-ar:params:xml:ns:registrant-1.0\"><registrantTransfer><name>ACTKUTST.com.ae</name><curExpDate>"
+ EPPDateFormatter::toXSDate(*curExpDate)
+ "</curExpDate><period unit=\"y\">2</period><kvlist xmlns=\"urn:X-ar:params:xml:ns:kv-1.0\" name=\"ae\"><item key=\"eligibilityIDType\">Trademark</item><item key=\"eligibilityIDValue\">1231239523</item><item key=\"eligibilityName\">Blah</item><item key=\"eligibilityType\">Trademark</item><item key=\"policyReason\">1</item><item key=\"registrantIDType\">Trade License</item><item key=\"registrantIDValue\">01241326211</item><item key=\"registrantName\">AusRegistry</item></kvlist><explanation>testing</explanation></registrantTransfer><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></extension></epp>"
+ "</curExpDate><period unit=\"y\">2</period><kvlist xmlns=\"urn:X-ar:params:xml:ns:kv-1.0\" name=\"ae\"><item key=\"eligibilityIDType\">Trademark</item><item key=\"eligibilityIDValue\">1231239523</item><item key=\"eligibilityName\">Blah</item><item key=\"eligibilityType\">Trademark</item><item key=\"policyReason\">1</item><item key=\"registrantIDType\">Trade License</item><item key=\"registrantIDValue\">01241326211</item><item key=\"registrantName\">AusRegistry</item></kvlist><explanation>testing</explanation></registrantTransfer><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></extension></epp>"
);
}

View File

@ -12,33 +12,33 @@ void doWork()
{
init("./etc/toolkit2.conf");
{
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
Timer::setTime("20140101.010101");
DomainTransferQueryCommand cmd("jtkutest.com.au");
DomainTransferQueryCommand cmd("ACTKUTST.com.au");
const string xml(cmd.toXML());
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><transfer op=\"query\"><transfer 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></transfer></transfer><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
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><transfer op=\"query\"><transfer xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>ACTKUTST.com.au</name></transfer></transfer><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
}
{
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
Timer::setTime("20140101.010101");
DomainTransferQueryCommand cmd("jtkutest.com.au", "jtkUt3st");
DomainTransferQueryCommand cmd("ACTKUTST.com.au", "jtkUt3st");
const string xml(cmd.toXML());
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><transfer op=\"query\"><transfer 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><authInfo><pw>jtkUt3st</pw></authInfo></transfer></transfer><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
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><transfer op=\"query\"><transfer xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>ACTKUTST.com.au</name><authInfo><pw>jtkUt3st</pw></authInfo></transfer></transfer><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
}
{
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
Timer::setTime("20140101.010101");
DomainTransferQueryCommand cmd("jtkutest.com.au", "C100000-AR", "jtkUt3st");
DomainTransferQueryCommand cmd("ACTKUTST.com.au", "C100000-AR", "jtkUt3st");
const string xml(cmd.toXML());
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><transfer op=\"query\"><transfer 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><authInfo><pw roid=\"C100000-AR\">jtkUt3st</pw></authInfo></transfer></transfer><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
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><transfer op=\"query\"><transfer xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>ACTKUTST.com.au</name><authInfo><pw roid=\"C100000-AR\">jtkUt3st</pw></authInfo></transfer></transfer><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -19,20 +19,20 @@ using namespace std;
void testSimpleUpdate()
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
DomainUpdateCommand cmd("jtkutest.com.au");
DomainUpdateCommand cmd("ACTKUTST.com.au");
const string xml(cmd.toXML());
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><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
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>ACTKUTST.com.au</name></update></update><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
}
void testFullUpdate()
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
const char* addNsText[] = { "ns1.jtkutest.com.au", "ns2.jtkutest.com.au" };
const char* addNsText[] = { "ns1.ACTKUTST.com.au", "ns2.ACTKUTST.com.au" };
const vector<string> addNs(addNsText, addNsText + 2);
const vector<string> addTechContacts(1, "JTKCON");
@ -54,7 +54,7 @@ void testFullUpdate()
&addStatus);
const char* remNsText[] = { "ns3.jtkutest.com.au", "ns4.jtkutest.com.au" };
const char* remNsText[] = { "ns3.ACTKUTST.com.au", "ns4.ACTKUTST.com.au" };
const vector<string> remNs(remNsText, remNsText + 2);
const vector<string> remTechContacts(1, "JTKCON2");
@ -70,22 +70,22 @@ void testFullUpdate()
NULL,
&remStatus);
const string name("jtkutest.com.au");
const string name("ACTKUTST.com.au");
const string pw("jtkUT3st");
const string registrantID("JTKCON");
DomainUpdateCommand cmd("jtkutest.com.au", &pw, &add, &rem, &registrantID);
DomainUpdateCommand cmd("ACTKUTST.com.au", &pw, &add, &rem, &registrantID);
const string xml(cmd.toXML());
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><add><ns><hostObj>ns1.jtkutest.com.au</hostObj><hostObj>ns2.jtkutest.com.au</hostObj></ns><contact type=\"tech\">JTKCON</contact><contact type=\"admin\">JTKCON2</contact><contact type=\"billing\">JTKCON3</contact><status s=\"clientHold\">non-payment</status></add><rem><ns><hostObj>ns3.jtkutest.com.au</hostObj><hostObj>ns4.jtkutest.com.au</hostObj></ns><contact type=\"tech\">JTKCON2</contact><contact type=\"admin\">JTKCON</contact><status s=\"clientDeleteProhibited\"></status></rem><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
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>ACTKUTST.com.au</name><add><ns><hostObj>ns1.ACTKUTST.com.au</hostObj><hostObj>ns2.ACTKUTST.com.au</hostObj></ns><contact type=\"tech\">JTKCON</contact><contact type=\"admin\">JTKCON2</contact><contact type=\"billing\">JTKCON3</contact><status s=\"clientHold\">non-payment</status></add><rem><ns><hostObj>ns3.ACTKUTST.com.au</hostObj><hostObj>ns4.ACTKUTST.com.au</hostObj></ns><contact type=\"tech\">JTKCON2</contact><contact type=\"admin\">JTKCON</contact><status s=\"clientDeleteProhibited\"></status></rem><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
}
void testSyncExpiryDateExtension(void)
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
DomainUpdateCommand cmd("jtkutest.com.au");
DomainUpdateCommand cmd("ACTKUTST.com.au");
XMLGregorianCalendar *newExpiryDate = EPPDateFormatter::fromXSDateTime("2005-04-03T22:00:00.0Z");
DomainUpdateSyncCommandExtension extension(newExpiryDate);
@ -94,7 +94,7 @@ void testSyncExpiryDateExtension(void)
delete newExpiryDate;
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-ar:params:xml:ns:sync-1.0\"><exDate>2005-04-03T22:00:00.0Z</exDate></update></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
"<?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>ACTKUTST.com.au</name></update></update><extension><update xmlns=\"urn:X-ar:params:xml:ns:sync-1.0\"><exDate>2005-04-03T22:00:00.0Z</exDate></update></extension><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
}
void testSyncExpiryDateExtensionWithNullDate(void)

View File

@ -3,7 +3,7 @@
#include <string>
#include <vector>
#include <iostream>
#include "common/init.hpp"
#include "common/Test.hpp"
void doWork()

View File

@ -10,7 +10,7 @@ using namespace std;
void doWork()
{
init("./etc/toolkit2.conf");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
Hello cmd;
const string xml(cmd.toXML());

View File

@ -12,23 +12,23 @@ void doWork()
{
init("./etc/toolkit2.conf");
{
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
Timer::setTime("20140101.010101");
HostCheckCommand hcc("ns1.jtkutest.com.au");
HostCheckCommand hcc("ns1.ACTKUTST.com.au");
const string xml(hcc.toXML());
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><check><check xmlns=\"urn:ietf:params:xml:ns:host-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:host-1.0 host-1.0.xsd\"><name>ns1.jtkutest.com.au</name></check></check><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
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><check><check xmlns=\"urn:ietf:params:xml:ns:host-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:host-1.0 host-1.0.xsd\"><name>ns1.ACTKUTST.com.au</name></check></check><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
}
{
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
Timer::setTime("20140101.010101");
std::vector<std::string> names;
names.push_back("ns1.jtkutest.com.au");
names.push_back("ns2.jtkutest.com.au");
names.push_back("ns1.ACTKUTST.com.au");
names.push_back("ns2.ACTKUTST.com.au");
HostCheckCommand hcc(names);
const string xml(hcc.toXML());
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><check><check xmlns=\"urn:ietf:params:xml:ns:host-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:host-1.0 host-1.0.xsd\"><name>ns1.jtkutest.com.au</name><name>ns2.jtkutest.com.au</name></check></check><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
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><check><check xmlns=\"urn:ietf:params:xml:ns:host-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:host-1.0 host-1.0.xsd\"><name>ns1.ACTKUTST.com.au</name><name>ns2.ACTKUTST.com.au</name></check></check><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -12,25 +12,25 @@ void doWork()
{
init("./etc/toolkit2.conf");
{
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
Timer::setTime("20140101.010101");
HostCreateCommand hcc("ns1.jtkutest.com.au");
HostCreateCommand hcc("ns1.ACTKUTST.com.au");
const string xml(hcc.toXML());
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><create><create xmlns=\"urn:ietf:params:xml:ns:host-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:host-1.0 host-1.0.xsd\"><name>ns1.jtkutest.com.au</name></create></create><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
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><create><create xmlns=\"urn:ietf:params:xml:ns:host-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:host-1.0 host-1.0.xsd\"><name>ns1.ACTKUTST.com.au</name></create></create><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
}
{
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
Timer::setTime("20140101.010101");
vector<InetAddress> addrs;
addrs.push_back(InetAddress("192.168.0.1", IPVersion::IPv4()));
addrs.push_back(InetAddress("::1", IPVersion::IPv6()));
HostCreateCommand hcc("ns1.jtkutest.com.au", &addrs);
HostCreateCommand hcc("ns1.ACTKUTST.com.au", &addrs);
const string xml(hcc.toXML());
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><create><create xmlns=\"urn:ietf:params:xml:ns:host-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:host-1.0 host-1.0.xsd\"><name>ns1.jtkutest.com.au</name><addr ip=\"v4\">192.168.0.1</addr><addr ip=\"v6\">::1</addr></create></create><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
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><create><create xmlns=\"urn:ietf:params:xml:ns:host-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:host-1.0 host-1.0.xsd\"><name>ns1.ACTKUTST.com.au</name><addr ip=\"v4\">192.168.0.1</addr><addr ip=\"v6\">::1</addr></create></create><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -12,11 +12,11 @@ void doWork()
{
init("./etc/toolkit2.conf");
{
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
Timer::setTime("20140101.010101");
HostDeleteCommand hcc("ns1.jtkutest.com.au");
HostDeleteCommand hcc("ns1.ACTKUTST.com.au");
const string xml(hcc.toXML());
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><delete><delete xmlns=\"urn:ietf:params:xml:ns:host-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:host-1.0 host-1.0.xsd\"><name>ns1.jtkutest.com.au</name></delete></delete><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
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><delete><delete xmlns=\"urn:ietf:params:xml:ns:host-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:host-1.0 host-1.0.xsd\"><name>ns1.ACTKUTST.com.au</name></delete></delete><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -10,11 +10,11 @@ void doWork()
{
init("./etc/toolkit2.conf");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
HostInfoCommand cmd("ns1.jtkutest.com.au");
HostInfoCommand cmd("ns1.ACTKUTST.com.au");
const string xml = cmd.toXML();
ASSERT_EQ("<?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><info><info xmlns=\"urn:ietf:params:xml:ns:host-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:host-1.0 host-1.0.xsd\"><name>ns1.jtkutest.com.au</name></info></info><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>", xml);
ASSERT_EQ("<?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><info><info xmlns=\"urn:ietf:params:xml:ns:host-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:host-1.0 host-1.0.xsd\"><name>ns1.ACTKUTST.com.au</name></info></info><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>", xml);
}
int main(int argc, char* argv[])

View File

@ -22,38 +22,38 @@ void doWork()
init("./etc/toolkit2.conf");
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
LoginCommand cmd("JTKUTEST", "1234abcd!@#$JTK");
LoginCommand cmd("ACTKUTST", "1234abcd!@#$JTK");
const string xml(cmd.toXML());
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><login><clID>JTKUTEST</clID><pw>1234abcd!@#$JTK</pw><options><version>1.0</version><lang>en</lang></options><svcs><objURI>urn:ietf:params:xml:ns:domain-1.0</objURI><objURI>urn:ietf:params:xml:ns:host-1.0</objURI><objURI>urn:ietf:params:xml:ns:contact-1.0</objURI></svcs></login><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
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><login><clID>ACTKUTST</clID><pw>1234abcd!@#$JTK</pw><options><version>1.0</version><lang>en</lang></options><svcs><objURI>urn:ietf:params:xml:ns:domain-1.0</objURI><objURI>urn:ietf:params:xml:ns:host-1.0</objURI><objURI>urn:ietf:params:xml:ns:contact-1.0</objURI></svcs></login><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
}
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
LoginCommand cmd("JTKUTEST", "1234abcd!@#$JTK", objURIs, extURIs);
LoginCommand cmd("ACTKUTST", "1234abcd!@#$JTK", objURIs, extURIs);
const string xml(cmd.toXML());
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><login><clID>JTKUTEST</clID><pw>1234abcd!@#$JTK</pw><options><version>1.0</version><lang>en</lang></options><svcs><objURI>urn:ietf:params:xml:ns:domain-1.0</objURI><objURI>urn:ietf:params:xml:ns:host-1.0</objURI><objURI>urn:ietf:params:xml:ns:contact-1.0</objURI><svcExtension><extURI>urn:au:params:xml:ns:auext-1.0</extURI></svcExtension></svcs></login><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
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><login><clID>ACTKUTST</clID><pw>1234abcd!@#$JTK</pw><options><version>1.0</version><lang>en</lang></options><svcs><objURI>urn:ietf:params:xml:ns:domain-1.0</objURI><objURI>urn:ietf:params:xml:ns:host-1.0</objURI><objURI>urn:ietf:params:xml:ns:contact-1.0</objURI><svcExtension><extURI>urn:au:params:xml:ns:auext-1.0</extURI></svcExtension></svcs></login><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
}
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
LoginCommand cmd("JTKUTEST", "1234abcd!@#$JTK", "1.0", "fr", objURIs, extURIs);
CLTRID::setClID("ACTKUTST");
LoginCommand cmd("ACTKUTST", "1234abcd!@#$JTK", "1.0", "fr", objURIs, extURIs);
const string xml(cmd.toXML());
ASSERT_EQ("<?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><login><clID>JTKUTEST</clID><pw>1234abcd!@#$JTK</pw><options><version>1.0</version><lang>fr</lang></options><svcs><objURI>urn:ietf:params:xml:ns:domain-1.0</objURI><objURI>urn:ietf:params:xml:ns:host-1.0</objURI><objURI>urn:ietf:params:xml:ns:contact-1.0</objURI><svcExtension><extURI>urn:au:params:xml:ns:auext-1.0</extURI></svcExtension></svcs></login><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>", xml);
ASSERT_EQ("<?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><login><clID>ACTKUTST</clID><pw>1234abcd!@#$JTK</pw><options><version>1.0</version><lang>fr</lang></options><svcs><objURI>urn:ietf:params:xml:ns:domain-1.0</objURI><objURI>urn:ietf:params:xml:ns:host-1.0</objURI><objURI>urn:ietf:params:xml:ns:contact-1.0</objURI><svcExtension><extURI>urn:au:params:xml:ns:auext-1.0</extURI></svcExtension></svcs></login><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>", xml);
}
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
const string newPw("n(-w18PW*");
LoginCommand cmd("JTKUTEST", "1234abcd!@#$JTK", &newPw, "1.0", "fr", objURIs, extURIs);
LoginCommand cmd("ACTKUTST", "1234abcd!@#$JTK", &newPw, "1.0", "fr", objURIs, extURIs);
const string xml(cmd.toXML());
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><login><clID>JTKUTEST</clID><pw>1234abcd!@#$JTK</pw><newPW>n(-w18PW*</newPW><options><version>1.0</version><lang>fr</lang></options><svcs><objURI>urn:ietf:params:xml:ns:domain-1.0</objURI><objURI>urn:ietf:params:xml:ns:host-1.0</objURI><objURI>urn:ietf:params:xml:ns:contact-1.0</objURI><svcExtension><extURI>urn:au:params:xml:ns:auext-1.0</extURI></svcExtension></svcs></login><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
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><login><clID>ACTKUTST</clID><pw>1234abcd!@#$JTK</pw><newPW>n(-w18PW*</newPW><options><version>1.0</version><lang>fr</lang></options><svcs><objURI>urn:ietf:params:xml:ns:domain-1.0</objURI><objURI>urn:ietf:params:xml:ns:host-1.0</objURI><objURI>urn:ietf:params:xml:ns:contact-1.0</objURI><svcExtension><extURI>urn:au:params:xml:ns:auext-1.0</extURI></svcExtension></svcs></login><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -12,13 +12,13 @@ void doWork()
{
init("./etc/toolkit2.conf");
{
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
Timer::setTime("20140101.010101");
LogoutCommand cmd;
const string xml(cmd.toXML());
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><logout/><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
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><logout/><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -10,11 +10,11 @@ void doWork()
{
init("./etc/toolkit2.conf");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
PollAckCommand cmd(123);
const string xml = cmd.toXML();
ASSERT_EQ("<?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><poll msgID=\"123\" op=\"ack\"/><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>", xml);
ASSERT_EQ("<?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><poll msgID=\"123\" op=\"ack\"/><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>", xml);
}
int main(int argc, char* argv[])

View File

@ -1,9 +1,9 @@
#include "se/PollResponse.hpp"
#include "se/CLTRID.hpp"
#include "common/init.hpp"
#include "se/EPPDateFormatter.hpp"
#include "xml/XMLParser.hpp"
#include "session/Timer.hpp"
#include "common/init.hpp"
#include "common/Test.hpp"
#include <iostream>
@ -25,13 +25,13 @@ void doWork()
void testContactTransferApprovePoll()
{
const string xml =
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><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\"><response><result code=\"1301\"><msg>Command completed successfully; ack to dequeue</msg></result><msgQ count=\"5\" id=\"12345\"><qDate>2000-06-08T22:00:00.0Z</qDate><msg lang=\"en\">Transfer requested.</msg></msgQ><resData><contact:trnData xmlns:contact=\"urn:ietf:params:xml:ns:contact-1.0\"><contact:id>JTKUTEST</contact:id><contact:trStatus>pending</contact:trStatus><contact:reID>ClientX</contact:reID><contact:reDate>2000-06-08T22:00:00.0Z</contact:reDate><contact:acID>ClientY</contact:acID><contact:acDate>2000-06-13T22:00:00.0Z</contact:acDate></contact:trnData></resData><trID><clTRID>ABC-12345</clTRID><svTRID>54321-XYZ</svTRID></trID></response></epp>";
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><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\"><response><result code=\"1301\"><msg>Command completed successfully; ack to dequeue</msg></result><msgQ count=\"5\" id=\"12345\"><qDate>2000-06-08T22:00:00.0Z</qDate><msg lang=\"en\">Transfer requested.</msg></msgQ><resData><contact:trnData xmlns:contact=\"urn:ietf:params:xml:ns:contact-1.0\"><contact:id>ACTKUTST</contact:id><contact:trStatus>pending</contact:trStatus><contact:reID>ClientX</contact:reID><contact:reDate>2000-06-08T22:00:00.0Z</contact:reDate><contact:acID>ClientY</contact:acID><contact:acDate>2000-06-13T22:00:00.0Z</contact:acDate></contact:trnData></resData><trID><clTRID>ABC-12345</clTRID><svTRID>54321-XYZ</svTRID></trID></response></epp>";
PollResponse& response(getPollResponse(xml));
const ContactTransferResponse* ctr = response.getContactTransferResponse();
ASSERT(ctr != NULL);
ASSERT_EQ("JTKUTEST", ctr->getID());
ASSERT_EQ("ACTKUTST", ctr->getID());
ASSERT_EQ("pending", ctr->getTransferStatus());
ASSERT_EQ("ClientX", ctr->getRequestingClID());
ASSERT_EQ("ClientY", ctr->getActioningClID());

View File

@ -20,6 +20,7 @@ class XMLWriter;
*/
class PostalInfo : public Appendable
{
friend class ausRegEPPTK;
public:
virtual ~PostalInfo(){};

View File

@ -9,7 +9,7 @@ Logger* ReceiveSE::debugLogger;
void ReceiveSE::init()
{
std::string pname = "com.ausregistry.cpptoolkit.se";
std::string pname = "biz.meansofproduction.dnseppus.se";
maintLogger = Logger::getLogger(pname + ".maint");
supportLogger = Logger::getLogger(pname + ".support");
userLogger = Logger::getLogger(pname + ".user");

View File

@ -16,7 +16,7 @@ class DomainSecDNSCreateCommandExtension : public CommandExtension
/**
* Set the Create Data.
* The memory of createData pointer will be handled DomainSecDNSCreateCommandExtension,
* The memory of createData pointer will be handled DomainSecDNSCreateCommandExtension,
* memory will be auto freed when this extension instance is out of scope
*
* @param createData

View File

@ -14,9 +14,9 @@ using namespace std;
void testSecDNSAllFields()
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
DomainCreateCommand createCommand("jtkutest.com.au", "jtkUT3st", NULL);
DomainCreateCommand createCommand("ACTKUTST.com.au", "jtkUT3st", NULL);
auto_ptr<SecDNSDSData> dsData(new SecDNSDSData(12345, 3, 1, "49FD46E6C4B45C55D4AC"));
auto_ptr<SecDNSKeyData> keyData(new SecDNSKeyData(256, 3, 1, "AQPJ////4Q=="));
@ -34,16 +34,16 @@ void testSecDNSAllFields()
const string xml = createCommand.toXML();
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><create><create 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><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\"><maxSigLife>604800</maxSigLife><dsData><keyTag>12345</keyTag><alg>3</alg><digestType>1</digestType><digest>49FD46E6C4B45C55D4AC</digest><keyData><flags>256</flags><protocol>3</protocol><alg>1</alg><pubKey>AQPJ////4Q==</pubKey></keyData></dsData></create></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
"<?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><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>ACTKUTST.com.au</name><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\"><maxSigLife>604800</maxSigLife><dsData><keyTag>12345</keyTag><alg>3</alg><digestType>1</digestType><digest>49FD46E6C4B45C55D4AC</digest><keyData><flags>256</flags><protocol>3</protocol><alg>1</alg><pubKey>AQPJ////4Q==</pubKey></keyData></dsData></create></extension><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>"
);
}
void testSecDNSMultipleDSDataWithoutMaxSigLife()
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
DomainCreateCommand createCommand("jtkutest.com.au", "jtkUT3st", NULL);
DomainCreateCommand createCommand("ACTKUTST.com.au", "jtkUT3st", NULL);
auto_ptr<SecDNSDSData> dsData(new SecDNSDSData(12345, 3, 1, "38FD46E6C4B45C55D4AC"));
auto_ptr<SecDNSKeyData> keyData(new SecDNSKeyData(256, 3, 1, "AQPJ////4Q=="));
@ -62,16 +62,16 @@ void testSecDNSMultipleDSDataWithoutMaxSigLife()
const string xml = createCommand.toXML();
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><create><create 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><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\"><dsData><keyTag>12345</keyTag><alg>3</alg><digestType>1</digestType><digest>38FD46E6C4B45C55D4AC</digest><keyData><flags>256</flags><protocol>3</protocol><alg>1</alg><pubKey>AQPJ////4Q==</pubKey></keyData></dsData><dsData><keyTag>6789</keyTag><alg>2</alg><digestType>2</digestType><digest>49FD46E6C4B45C55D4AC</digest></dsData></create></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
"<?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><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>ACTKUTST.com.au</name><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\"><dsData><keyTag>12345</keyTag><alg>3</alg><digestType>1</digestType><digest>38FD46E6C4B45C55D4AC</digest><keyData><flags>256</flags><protocol>3</protocol><alg>1</alg><pubKey>AQPJ////4Q==</pubKey></keyData></dsData><dsData><keyTag>6789</keyTag><alg>2</alg><digestType>2</digestType><digest>49FD46E6C4B45C55D4AC</digest></dsData></create></extension><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>"
);
}
void testSecDNSAllFieldsMin()
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
DomainCreateCommand createCommand("jtkutest.com.au", "jtkUT3st", NULL);
DomainCreateCommand createCommand("ACTKUTST.com.au", "jtkUT3st", NULL);
auto_ptr<SecDNSDSData> dsData(new SecDNSDSData(0, 0, 0, "49FD46E6C4B45C55D4AC"));
auto_ptr<SecDNSKeyData> keyData(new SecDNSKeyData(0, 0, 0, "AQPJ////4Q=="));
@ -89,16 +89,16 @@ void testSecDNSAllFieldsMin()
const string xml = createCommand.toXML();
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><create><create 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><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\"><maxSigLife>1</maxSigLife><dsData><keyTag>0</keyTag><alg>0</alg><digestType>0</digestType><digest>49FD46E6C4B45C55D4AC</digest><keyData><flags>0</flags><protocol>0</protocol><alg>0</alg><pubKey>AQPJ////4Q==</pubKey></keyData></dsData></create></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
"<?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><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>ACTKUTST.com.au</name><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\"><maxSigLife>1</maxSigLife><dsData><keyTag>0</keyTag><alg>0</alg><digestType>0</digestType><digest>49FD46E6C4B45C55D4AC</digest><keyData><flags>0</flags><protocol>0</protocol><alg>0</alg><pubKey>AQPJ////4Q==</pubKey></keyData></dsData></create></extension><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>"
);
}
void testSecDNSAllFieldsMax()
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
DomainCreateCommand createCommand("jtkutest.com.au", "jtkUT3st", NULL);
DomainCreateCommand createCommand("ACTKUTST.com.au", "jtkUT3st", NULL);
auto_ptr<SecDNSDSData> dsData(new SecDNSDSData(65535, 255, 255, "49FD46E6C4B45C55D4AC"));
auto_ptr<SecDNSKeyData> keyData(new SecDNSKeyData(65535, 255, 255, "AQPJ////4Q=="));
@ -116,16 +116,16 @@ void testSecDNSAllFieldsMax()
const string xml = createCommand.toXML();
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><create><create 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><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\"><maxSigLife>2147483647</maxSigLife><dsData><keyTag>65535</keyTag><alg>255</alg><digestType>255</digestType><digest>49FD46E6C4B45C55D4AC</digest><keyData><flags>65535</flags><protocol>255</protocol><alg>255</alg><pubKey>AQPJ////4Q==</pubKey></keyData></dsData></create></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
"<?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><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>ACTKUTST.com.au</name><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\"><maxSigLife>2147483647</maxSigLife><dsData><keyTag>65535</keyTag><alg>255</alg><digestType>255</digestType><digest>49FD46E6C4B45C55D4AC</digest><keyData><flags>65535</flags><protocol>255</protocol><alg>255</alg><pubKey>AQPJ////4Q==</pubKey></keyData></dsData></create></extension><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>"
);
}
void testSecDNSJustKeyData()
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
DomainCreateCommand createCommand("jtkutest.com.au", "jtkUT3st", NULL);
DomainCreateCommand createCommand("ACTKUTST.com.au", "jtkUT3st", NULL);
auto_ptr<SecDNSKeyData> keyData(new SecDNSKeyData(65535, 255, 255, "AQPJ////4Q=="));
@ -141,7 +141,7 @@ void testSecDNSJustKeyData()
const string xml = createCommand.toXML();
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><create><create 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><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\"><maxSigLife>65535</maxSigLife><keyData><flags>65535</flags><protocol>255</protocol><alg>255</alg><pubKey>AQPJ////4Q==</pubKey></keyData></create></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
"<?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><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>ACTKUTST.com.au</name><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\"><maxSigLife>65535</maxSigLife><keyData><flags>65535</flags><protocol>255</protocol><alg>255</alg><pubKey>AQPJ////4Q==</pubKey></keyData></create></extension><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>"
);
}

View File

@ -14,11 +14,11 @@ using namespace std;
void testSecDNSAddFieldsUrgent()
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
string passwd = "jtkUT3st";
string registrantID = "JTKCON";
DomainUpdateCommand updateCommand("jtkutest.com.au", &passwd, NULL, NULL, &registrantID);
DomainUpdateCommand updateCommand("ACTKUTST.com.au", &passwd, NULL, NULL, &registrantID);
auto_ptr<SecDNSDSData> dsData(new SecDNSDSData(12345, 3, 1, "49FD46E6C4B45C55D4AC"));
auto_ptr<SecDNSKeyData> keyData(new SecDNSKeyData(256, 3, 1, "AQPJ////4Q=="));
@ -37,18 +37,18 @@ void testSecDNSAddFieldsUrgent()
const string xml = updateCommand.toXML();
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><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><extension><update xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\" urgent=\"true\"><add><maxSigLife>604800</maxSigLife><dsData><keyTag>12345</keyTag><alg>3</alg><digestType>1</digestType><digest>49FD46E6C4B45C55D4AC</digest><keyData><flags>256</flags><protocol>3</protocol><alg>1</alg><pubKey>AQPJ////4Q==</pubKey></keyData></dsData></add></update></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
"<?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>ACTKUTST.com.au</name><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><extension><update xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\" urgent=\"true\"><add><maxSigLife>604800</maxSigLife><dsData><keyTag>12345</keyTag><alg>3</alg><digestType>1</digestType><digest>49FD46E6C4B45C55D4AC</digest><keyData><flags>256</flags><protocol>3</protocol><alg>1</alg><pubKey>AQPJ////4Q==</pubKey></keyData></dsData></add></update></extension><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>"
);
}
void testSecDNSRemoveFieldsNotUrgent()
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
string passwd = "jtkUT3st";
string registrantID = "JTKCON";
DomainUpdateCommand updateCommand("jtkutest.com.au", &passwd, NULL, NULL, &registrantID);
DomainUpdateCommand updateCommand("ACTKUTST.com.au", &passwd, NULL, NULL, &registrantID);
auto_ptr<SecDNSDSData> dsData(new SecDNSDSData(65535, 255, 255, "49FD46E6C4B45C55D4AC"));
auto_ptr<SecDNSKeyData> keyData(new SecDNSKeyData(65535, 255, 255, "AQPJ////4Q=="));
@ -65,18 +65,18 @@ void testSecDNSRemoveFieldsNotUrgent()
const string xml = updateCommand.toXML();
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><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><extension><update xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\"><rem><dsData><keyTag>65535</keyTag><alg>255</alg><digestType>255</digestType><digest>49FD46E6C4B45C55D4AC</digest><keyData><flags>65535</flags><protocol>255</protocol><alg>255</alg><pubKey>AQPJ////4Q==</pubKey></keyData></dsData></rem></update></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
"<?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>ACTKUTST.com.au</name><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><extension><update xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\"><rem><dsData><keyTag>65535</keyTag><alg>255</alg><digestType>255</digestType><digest>49FD46E6C4B45C55D4AC</digest><keyData><flags>65535</flags><protocol>255</protocol><alg>255</alg><pubKey>AQPJ////4Q==</pubKey></keyData></dsData></rem></update></extension><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>"
);
}
void testSecDNSRemoveAll()
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
string passwd = "jtkUT3st";
string registrantID = "JTKCON";
DomainUpdateCommand updateCommand("jtkutest.com.au", &passwd, NULL, NULL, &registrantID);
DomainUpdateCommand updateCommand("ACTKUTST.com.au", &passwd, NULL, NULL, &registrantID);
auto_ptr<SecDNSRemType> remData(new SecDNSRemType());
@ -90,18 +90,18 @@ void testSecDNSRemoveAll()
const string xml = updateCommand.toXML();
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><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><extension><update xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\" urgent=\"true\"><rem><all>true</all></rem></update></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
"<?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>ACTKUTST.com.au</name><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><extension><update xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\" urgent=\"true\"><rem><all>true</all></rem></update></extension><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>"
);
}
void testSecDNSRemoveAllAndAddDsData()
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
string passwd = "jtkUT3st";
string registrantID = "JTKCON";
DomainUpdateCommand updateCommand("jtkutest.com.au", &passwd, NULL, NULL, &registrantID);
DomainUpdateCommand updateCommand("ACTKUTST.com.au", &passwd, NULL, NULL, &registrantID);
auto_ptr<SecDNSRemType> remData(new SecDNSRemType());
@ -120,18 +120,18 @@ void testSecDNSRemoveAllAndAddDsData()
const string xml = updateCommand.toXML();
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><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><extension><update xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\" urgent=\"true\"><rem><all>true</all></rem><add><dsData><keyTag>65535</keyTag><alg>255</alg><digestType>255</digestType><digest>49FD46E6C4B45C55D4AC</digest></dsData></add></update></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
"<?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>ACTKUTST.com.au</name><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><extension><update xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\" urgent=\"true\"><rem><all>true</all></rem><add><dsData><keyTag>65535</keyTag><alg>255</alg><digestType>255</digestType><digest>49FD46E6C4B45C55D4AC</digest></dsData></add></update></extension><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>"
);
}
void testSecDNSRemoveAllAndAddKeyData()
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
string passwd = "jtkUT3st";
string registrantID = "JTKCON";
DomainUpdateCommand updateCommand("jtkutest.com.au", &passwd, NULL, NULL, &registrantID);
DomainUpdateCommand updateCommand("ACTKUTST.com.au", &passwd, NULL, NULL, &registrantID);
auto_ptr<SecDNSRemType> remData(new SecDNSRemType());
@ -150,18 +150,18 @@ void testSecDNSRemoveAllAndAddKeyData()
const string xml = updateCommand.toXML();
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><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><extension><update xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\" urgent=\"true\"><rem><all>true</all></rem><add><keyData><flags>65535</flags><protocol>255</protocol><alg>255</alg><pubKey>AQPJ////4Q==</pubKey></keyData></add></update></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
"<?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>ACTKUTST.com.au</name><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><extension><update xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\" urgent=\"true\"><rem><all>true</all></rem><add><keyData><flags>65535</flags><protocol>255</protocol><alg>255</alg><pubKey>AQPJ////4Q==</pubKey></keyData></add></update></extension><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>"
);
}
void testSecDNSRemoveAllAndAddKeyDataAndChangeMaxSigLife()
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
string passwd = "jtkUT3st";
string registrantID = "JTKCON";
DomainUpdateCommand updateCommand("jtkutest.com.au", &passwd, NULL, NULL, &registrantID);
DomainUpdateCommand updateCommand("ACTKUTST.com.au", &passwd, NULL, NULL, &registrantID);
auto_ptr<SecDNSRemType> remData(new SecDNSRemType());
@ -185,7 +185,7 @@ void testSecDNSRemoveAllAndAddKeyDataAndChangeMaxSigLife()
const string xml = updateCommand.toXML();
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><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><extension><update xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\" urgent=\"true\"><rem><all>true</all></rem><add><keyData><flags>65535</flags><protocol>255</protocol><alg>255</alg><pubKey>AQPJ////4Q==</pubKey></keyData></add><chg><maxSigLife>604800</maxSigLife></chg></update></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
"<?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>ACTKUTST.com.au</name><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><extension><update xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\" urgent=\"true\"><rem><all>true</all></rem><add><keyData><flags>65535</flags><protocol>255</protocol><alg>255</alg><pubKey>AQPJ////4Q==</pubKey></keyData></add><chg><maxSigLife>604800</maxSigLife></chg></update></extension><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>"
);
}

View File

@ -23,7 +23,7 @@
using namespace std;
//string SessionManagerImpl::pname("com.ausregistry.cpptoolkit.session");
//string SessionManagerImpl::pname("biz.meansofproduction.dnseppus.session");
string SessionManagerImpl::pname("biz.meansofproduction.dnseppus.session");
SessionManagerImpl::SessionManagerImpl(SessionManagerProperties* props)

View File

@ -23,7 +23,7 @@
using namespace std;
const float SessionPoolImpl::PI_STO_FRACT = 0.4;
const string SessionPoolImpl::pname("com.ausregistry.cpptoolkit.session");
const string SessionPoolImpl::pname("biz.meansofproduction.dnseppus.session");
SessionPoolImpl::SessionPoolImpl(SessionPoolProperties* props)

View File

@ -51,7 +51,7 @@ TLSSession::TLSSession(SessionProperties* props)
pthread_cond_init(&cond, NULL);
configure(props);
const string pname("com.ausregistry.cpptoolkit.session");
const string pname("biz.meansofproduction.dnseppus.session");
debugLogger = Logger::getLogger(pname + ".debug");
supportLogger = Logger::getLogger(pname + ".support");
userLogger = Logger::getLogger(pname + ".user");

View File

@ -31,7 +31,7 @@ namespace {
public:
ErrorHandlerImpl()
{
userLogger = Logger::getLogger("com.ausregistry.cpptoolkit.xml.user");
userLogger = Logger::getLogger("biz.meansofproduction.dnseppus.xml.user");
}
void warning(const SAXParseException& e)

View File

@ -28,7 +28,7 @@ string xmlProlog(const string& version, const string& enc)
void XMLWriter::init()
{
const string pname("com.ausregistry.cpptoolkit.xml");
const string pname("biz.meansofproduction.dnseppus.xml");
debugLogger = Logger::getLogger(pname + ".debug");
userLogger = Logger::getLogger(pname + ".user");
}

View File

@ -122,7 +122,7 @@ build/masterDaemon.o: server/masterDaemon.cpp include/*.h
$(CC) $(CFLAGS) server/masterDaemon.cpp -c -o build/masterDaemon.o $(SINCL) $(ARTKINCL)
build/mdAusReg.o: server/mdAusReg.cpp include/*.h
$(CC) $(CFLAGS) server/mdAusReg.cpp -c -o build/mdAusReg.o $(SINCL) $(ARTKINCL)
$(CC) $(CFLAGS) server/mdAusReg.cpp -c -o build/mdAusReg.o $(SINCL) $(ARTKINCL) $(ARTKLIB) -l libACTK1_0.so
build/ausreg-md: $(MDOBJS)
$(CC) $(CFLAGS) -o build/ausreg-md $(SINCL) $(LIBS) $(MDOBJS) $(DLIBS)

View File

@ -11,7 +11,7 @@
#include "OTE/LPECheckCommand.hpp"
#include "OTE/LPECheckResponse.hpp"
#include "se/TransferOp.hpp"
#include "se/PostalInfo.hpp"
#include "se/IntPostalInfo.hpp"
#include "se/ContactCreateCommand.hpp"
#include "se/ContactCreateResponse.hpp"
#include "se/DomainCreateCommand.hpp"
@ -23,13 +23,19 @@
using namespace std;
class RRJPI : public PostalInfo {
public:
RRJPI(const PostalInfoType *type,const string& name, const string& org,
const std::vector<std::string>& street, const string& city,
const string& state,const string& pc, const string& guo)
: PostalInfo (type, name, org, street, city, state, pc, guo) { };
};
//class RRJPI : public PostalInfo {
// public:
// RRJPI(const PostalInfoType *type,const string& name, const string& org,
// const std::vector<std::string>& street, const string& city,
// const string& state,const string& pc, const string& guo)
// : PostalInfo (type, name, org, street, city, state, pc, guo) { };
//};
char *name1 = "bestever.camera";
char *name2 = "yoda.guru";
char *name3 = "pricey.holdings";
char *name4 = "unicycles.bike";
char *name5 = "greedy.ventures";
static TestEnvironment props;
@ -96,8 +102,11 @@ void ausRegEPPTK::doOTEA()
}
}
void ausRegEPPTK::doOTEB()
{ bool debug=true;
int cmd=0,thisAccount=0;
{
bool addDomains = false, debug=true, contactCreated = true, doTransfers = false;
int cmd=0;
char *thatAccount="secura2-ote", *thisAccount="secura1-ote";
string op("newInstance");
Transaction thisTest;
@ -121,7 +130,7 @@ void ausRegEPPTK::doOTEB()
theseLogs->logN(1,"OTE Basic Access Setup (%d).",cmd++);
const PostalInfoType *pits=new PostalInfoType(string("int"));
// const PostalInfoType *pits=new PostalInfoType(string("int"));
const std::string rrj("renjuan");
const std::string rrjPW("Ab9dW@rd");
@ -135,26 +144,30 @@ void ausRegEPPTK::doOTEB()
const std::string rrjGuo("US");
const std::string rrjOrg("American Kybernetik");
const RRJPI rrjPO(pits,rrjName,rrjOrg,
const IntPostalInfo rrjPO(rrjName,rrjOrg,
rrjCrib,rrjCity,rrjProv,rrjPC,rrjGuo);
ContactCreateCommand baCommand_0(rrj,rrjPW,&rrjPO,rrjEmail);
ContactCreateResponse baResponse_0;
try {
if (!contactCreated) try {
thisTest = Transaction(&baCommand_0, &baResponse_0);
manager->execute(thisTest);
}
catch(const std::exception e)
{
theseLogs->logN(1,"Case %d: %s.",cmd++,e.what());
}
catch(...)
{
theseLogs->logN(1,"Case %d Failed, harness catch.",cmd++);
}
theseLogs->logN(1,"Begin Basic Access OTE Transactions.");
theseLogs->logN(1,"Continue Basic Access OTE Transactions.");
sleep(2);
theseLogs->logN(1,"(%d) Conventional check of yoda.guru",cmd++);
DomainCheckCommand baCommand_1("yoda.guru");
DomainCheckCommand baCommand_1(name2);
DomainCheckResponse baResponse_1;
try {
@ -166,9 +179,9 @@ void ausRegEPPTK::doOTEB()
theseLogs->logN(0,"Case %d Failed, harness catch.",cmd++);
}
theseLogs->logN(1,"(%d) LPE Check of pricey.holdings",cmd++);
theseLogs->logN(1,"(%d) LPE Check of unicycles.bike",cmd++);
LPECheckCommand baCommand_2("pricey.holdings");
LPECheckCommand baCommand_2("unicycles.bike");
LPECheckResponse baResponse_2;
thisTest = Transaction(&baCommand_2, &baResponse_2);
@ -186,25 +199,50 @@ void ausRegEPPTK::doOTEB()
// billing.push_back(std::string("Billing"));
// ns.push_back(std::string("ns1.google.com"));
try { theseLogs->logN(2,"(%d) Try creating bestever.camera using OTE %d.",cmd++,
thisAccount++);
try { theseLogs->logN(2,"skip: (%d) LPE create more using OTE %s.",cmd++,
thisAccount);
DomainCreateCommand baCommand_3("bestever.camera",pw,&RID,
&tech, &ns, &admin, &billing);
if (addDomains) {
/* DomainCreateCommand
baCommand_3(name3,pw,&RID, &tech, &ns, &admin, &billing);
DomainCreateResponse baResponse_3;
thisTest = Transaction(&baCommand_3, &baResponse_3);
manager->execute(thisTest);
DomainCreateCommand
baCommand_3a(name2,pw,&RID, &tech, &ns, &admin, &billing);
DomainCreateResponse baResponse_3a;
thisTest = Transaction(&baCommand_3a, &baResponse_3a);
manager->execute(thisTest);
*/
DomainCreateCommand
baCommand_3b(name5,pw,&RID, &tech, &ns, &admin, &billing);
DomainCreateResponse baResponse_3b;
thisTest = Transaction(&baCommand_3b, &baResponse_3b);
manager->execute(thisTest);
DomainCreateCommand
baCommand_3c(name4,pw,&RID, &tech, &ns, &admin, &billing);
DomainCreateResponse baResponse_3c;
thisTest = Transaction(&baCommand_3c, &baResponse_3c);
manager->execute(thisTest);
}
}
catch(...)
{
theseLogs->logN(0,"Case %d Failed, harness catch.",cmd++);
}
theseLogs->logN(2,"skip (%d) yoda.guru, bestever.camera -> %s.",cmd++,
thatAccount);
theseLogs->logN(2,"(%d) Transfer bestever.camera to OTE Account %d.",cmd++,
thisAccount++);
if (doTransfers) {
const TransferOp *thisTransfer = new TransferOp("request");
@ -223,7 +261,9 @@ void ausRegEPPTK::doOTEB()
theseLogs->logN(0,"Case %d Failed, harness catch.",cmd++);
}
theseLogs->logN(1,"(%d) Sunrise create bestever.camera with ICANN SMD test files.",cmd++);
}
theseLogs->logN(1,"(%d) Sunrise create bestever.camera with ICANN SMD test files.",cmd++);
LPECreateCommand baCommand_5("bestever.camera",pw,&RID);
LPECreateResponse baResponse_5;

View File

@ -16,7 +16,7 @@ static std::string pname;
void ErrorPkg::init() throw (PropertyConfigException)
{
pname = "com.ausregistry.cpptoolkit";
pname = "biz.meansofproduction.dnseppus";
try
{
string msgsFile = SystemProperties::getProperty("epp.client.messages.file");

View File

@ -9,7 +9,7 @@ namespace {
void SystemProperties::init(const string& file)
{
//static string name = "com.ausregistry.cpptoolkit";
//static string name = "biz.meansofproduction.dnseppus";
properties.load(file);
}

View File

@ -27,16 +27,16 @@ void doWork()
*/
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
vector<string> techIds;
techIds.push_back("JTKCON2");
string registrant("JTKCON");
AeDomainCreateCommand cmd("jtkutest.co.ae", "jtkUT3st", &registrant, &techIds,
AeDomainCreateCommand cmd("ACTKUTST.co.ae", "jtkUT3st", &registrant, &techIds,
eligibilityType, policyReason, registrantName);
const string xml(cmd.toXML());
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><create><create 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.co.ae</name><registrant>JTKCON</registrant><contact type=\"tech\">JTKCON2</contact><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:X-ae:params:xml:ns:aeext-1.0\" xsi:schemaLocation=\"urn:X-ae:params:xml:ns:aeext-1.0 aeext-1.0.xsd\"><aeProperties><registrantName>AusRegistry</registrantName><eligibilityType>Trade License (IT)</eligibilityType><policyReason>1</policyReason></aeProperties></create></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
"<?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><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>ACTKUTST.co.ae</name><registrant>JTKCON</registrant><contact type=\"tech\">JTKCON2</contact><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:X-ae:params:xml:ns:aeext-1.0\" xsi:schemaLocation=\"urn:X-ae:params:xml:ns:aeext-1.0 aeext-1.0.xsd\"><aeProperties><registrantName>AusRegistry</registrantName><eligibilityType>Trade License (IT)</eligibilityType><policyReason>1</policyReason></aeProperties></create></extension><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
}
/**
@ -47,7 +47,7 @@ void doWork()
*/
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
vector<string> techIds;
techIds.push_back("JTKCON2");
@ -65,7 +65,7 @@ void doWork()
Period period(48, PeriodUnit::MONTHS());
AeDomainCreateCommand cmd(
"jtkutest.co.ae", "jtkUT3st", &registrant,
"ACTKUTST.co.ae", "jtkUT3st", &registrant,
&techIds, &adminContacts,
NULL, &nameServers, &period,
eligibilityType, policyReason,
@ -73,7 +73,7 @@ void doWork()
&registrantIDType, &eligibilityName,
&eligibilityID, &eligibilityIDType);
const string xml(cmd.toXML());
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><create><create 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.co.ae</name><period unit=\"m\">48</period><ns><hostObj>ns1.ausregistry.net</hostObj><hostObj>ns2.ausregistry.net</hostObj></ns><registrant>JTKCON</registrant><contact type=\"admin\">JTKCON</contact><contact type=\"admin\">JTKCON2</contact><contact type=\"tech\">JTKCON2</contact><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:X-ae:params:xml:ns:aeext-1.0\" xsi:schemaLocation=\"urn:X-ae:params:xml:ns:aeext-1.0 aeext-1.0.xsd\"><aeProperties><registrantName>AusRegistry</registrantName><registrantID type=\"Trade License\">01241326211</registrantID><eligibilityType>Trade License (IT)</eligibilityType><eligibilityName>Blah</eligibilityName><eligibilityID type=\"Trademark\">1231239523</eligibilityID><policyReason>1</policyReason></aeProperties></create></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
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><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>ACTKUTST.co.ae</name><period unit=\"m\">48</period><ns><hostObj>ns1.ausregistry.net</hostObj><hostObj>ns2.ausregistry.net</hostObj></ns><registrant>JTKCON</registrant><contact type=\"admin\">JTKCON</contact><contact type=\"admin\">JTKCON2</contact><contact type=\"tech\">JTKCON2</contact><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:X-ae:params:xml:ns:aeext-1.0\" xsi:schemaLocation=\"urn:X-ae:params:xml:ns:aeext-1.0 aeext-1.0.xsd\"><aeProperties><registrantName>AusRegistry</registrantName><registrantID type=\"Trade License\">01241326211</registrantID><eligibilityType>Trade License (IT)</eligibilityType><eligibilityName>Blah</eligibilityName><eligibilityID type=\"Trademark\">1231239523</eligibilityID><policyReason>1</policyReason></aeProperties></create></extension><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -13,11 +13,11 @@ void doWork()
init("./etc/toolkit2.conf");
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
ArDomainPolicyDeleteCommand cmd("jtkutest.com.au", "jtkutest");
ArDomainPolicyDeleteCommand cmd("ACTKUTST.com.au", "ACTKUTST");
const string xml(cmd.toXML());
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\"><extension><command xmlns=\"urn:X-ar:params:xml:ns:arext-1.0\" xsi:schemaLocation=\"urn:X-ar:params:xml:ns:arext-1.0 arext-1.0.xsd\"><policyDelete><policyDelete xmlns=\"urn:X-ar:params:xml:ns:ardomain-1.0\" xsi:schemaLocation=\"urn:X-ar:params:xml:ns:ardomain-1.0 ardomain-1.0.xsd\"><name>jtkutest.com.au</name><reason>jtkutest</reason></policyDelete></policyDelete><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></extension></epp>");
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\"><extension><command xmlns=\"urn:X-ar:params:xml:ns:arext-1.0\" xsi:schemaLocation=\"urn:X-ar:params:xml:ns:arext-1.0 arext-1.0.xsd\"><policyDelete><policyDelete xmlns=\"urn:X-ar:params:xml:ns:ardomain-1.0\" xsi:schemaLocation=\"urn:X-ar:params:xml:ns:ardomain-1.0 ardomain-1.0.xsd\"><name>ACTKUTST.com.au</name><reason>ACTKUTST</reason></policyDelete></policyDelete><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></extension></epp>");
}
}

View File

@ -13,11 +13,11 @@ void doWork()
init("./etc/toolkit2.conf");
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
ArDomainPolicyUndeleteCommand cmd("jtkutest.com.au");
ArDomainPolicyUndeleteCommand cmd("ACTKUTST.com.au");
const string xml(cmd.toXML());
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\"><extension><command xmlns=\"urn:X-ar:params:xml:ns:arext-1.0\" xsi:schemaLocation=\"urn:X-ar:params:xml:ns:arext-1.0 arext-1.0.xsd\"><policyUndelete><policyUndelete xmlns=\"urn:X-ar:params:xml:ns:ardomain-1.0\" xsi:schemaLocation=\"urn:X-ar:params:xml:ns:ardomain-1.0 ardomain-1.0.xsd\"><name>jtkutest.com.au</name></policyUndelete></policyUndelete><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></extension></epp>");
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\"><extension><command xmlns=\"urn:X-ar:params:xml:ns:arext-1.0\" xsi:schemaLocation=\"urn:X-ar:params:xml:ns:arext-1.0 arext-1.0.xsd\"><policyUndelete><policyUndelete xmlns=\"urn:X-ar:params:xml:ns:ardomain-1.0\" xsi:schemaLocation=\"urn:X-ar:params:xml:ns:ardomain-1.0 ardomain-1.0.xsd\"><name>ACTKUTST.com.au</name></policyUndelete></policyUndelete><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></extension></epp>");
}
}

View File

@ -14,10 +14,10 @@ void doWork()
init("./etc/toolkit2.conf");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
ArDomainUndeleteCommand cmd("jtkutest.com.au");
CLTRID::setClID("ACTKUTST");
ArDomainUndeleteCommand cmd("ACTKUTST.com.au");
const string xml(cmd.toXML());
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\"><extension><command xmlns=\"urn:X-ar:params:xml:ns:arext-1.0\" xsi:schemaLocation=\"urn:X-ar:params:xml:ns:arext-1.0 arext-1.0.xsd\"><undelete><undelete xmlns=\"urn:X-ar:params:xml:ns:ardomain-1.0\" xsi:schemaLocation=\"urn:X-ar:params:xml:ns:ardomain-1.0 ardomain-1.0.xsd\"><name>jtkutest.com.au</name></undelete></undelete><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></extension></epp>");
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\"><extension><command xmlns=\"urn:X-ar:params:xml:ns:arext-1.0\" xsi:schemaLocation=\"urn:X-ar:params:xml:ns:arext-1.0 arext-1.0.xsd\"><undelete><undelete xmlns=\"urn:X-ar:params:xml:ns:ardomain-1.0\" xsi:schemaLocation=\"urn:X-ar:params:xml:ns:ardomain-1.0 ardomain-1.0.xsd\"><name>ACTKUTST.com.au</name></undelete></undelete><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></extension></epp>");
}
int main(int argc, char* argv[])

View File

@ -14,12 +14,12 @@ void doWork()
init("./etc/toolkit2.conf");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
ArDomainUnrenewCommand cmd(
"jtkutest.com.au", *EPPDateFormatter::fromXSDateTime("2014-01-01T00:00:00.0Z"));
"ACTKUTST.com.au", *EPPDateFormatter::fromXSDateTime("2014-01-01T00:00:00.0Z"));
const string xml(cmd.toXML());
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\"><extension><command xmlns=\"urn:X-ar:params:xml:ns:arext-1.0\" xsi:schemaLocation=\"urn:X-ar:params:xml:ns:arext-1.0 arext-1.0.xsd\"><unrenew><unrenew xmlns=\"urn:X-ar:params:xml:ns:ardomain-1.0\" xsi:schemaLocation=\"urn:X-ar:params:xml:ns:ardomain-1.0 ardomain-1.0.xsd\"><name>jtkutest.com.au</name><curExpDate>2014-01-01</curExpDate></unrenew></unrenew><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></extension></epp>");
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\"><extension><command xmlns=\"urn:X-ar:params:xml:ns:arext-1.0\" xsi:schemaLocation=\"urn:X-ar:params:xml:ns:arext-1.0 arext-1.0.xsd\"><unrenew><unrenew xmlns=\"urn:X-ar:params:xml:ns:ardomain-1.0\" xsi:schemaLocation=\"urn:X-ar:params:xml:ns:ardomain-1.0 ardomain-1.0.xsd\"><name>ACTKUTST.com.au</name><curExpDate>2014-01-01</curExpDate></unrenew></unrenew><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></extension></epp>");
}
int main(int argc, char* argv[])

View File

@ -27,16 +27,16 @@ void doWork()
*/
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
vector<string> techIds;
techIds.push_back("JTKCON2");
string registrant("JTKCON");
AuDomainCreateCommand cmd("jtkutest.com.au", "jtkUT3st", &registrant, &techIds,
AuDomainCreateCommand cmd("ACTKUTST.com.au", "jtkUT3st", &registrant, &techIds,
eligibilityType, policyReason, registrantName);
const string xml(cmd.toXML());
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><create><create 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><registrant>JTKCON</registrant><contact type=\"tech\">JTKCON2</contact><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create 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><eligibilityType>Company</eligibilityType><policyReason>1</policyReason></auProperties></create></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
"<?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><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>ACTKUTST.com.au</name><registrant>JTKCON</registrant><contact type=\"tech\">JTKCON2</contact><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create 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><eligibilityType>Company</eligibilityType><policyReason>1</policyReason></auProperties></create></extension><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
}
/**
@ -47,7 +47,7 @@ void doWork()
*/
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
vector<string> techIds;
techIds.push_back("JTKCON2");
@ -63,7 +63,7 @@ void doWork()
nameServers.push_back("ns2.ausregistry.net");
AuDomainCreateCommand cmd(
"jtkutest.com.au", "jtkUT3st", &registrant,
"ACTKUTST.com.au", "jtkUT3st", &registrant,
&techIds, &adminContacts,
NULL, &nameServers,
eligibilityType, policyReason,
@ -71,7 +71,7 @@ void doWork()
&registrantIDType, &eligibilityName,
&eligibilityID, &eligibilityIDType);
const string xml(cmd.toXML());
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><create><create 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><ns><hostObj>ns1.ausregistry.net</hostObj><hostObj>ns2.ausregistry.net</hostObj></ns><registrant>JTKCON</registrant><contact type=\"admin\">JTKCON</contact><contact type=\"admin\">JTKCON2</contact><contact type=\"tech\">JTKCON2</contact><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create 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></create></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
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><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>ACTKUTST.com.au</name><ns><hostObj>ns1.ausregistry.net</hostObj><hostObj>ns2.ausregistry.net</hostObj></ns><registrant>JTKCON</registrant><contact type=\"admin\">JTKCON</contact><contact type=\"admin\">JTKCON2</contact><contact type=\"tech\">JTKCON2</contact><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create 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></create></extension><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -22,10 +22,10 @@ void doWork()
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
AuDomainModifyRegistrantCommand cmd(
"jtkutest.com.au",
"ACTKUTST.com.au",
registrantName,
"testing",
&eligibilityType,
@ -36,7 +36,7 @@ void doWork()
&eligibilityID,
&eligibilityIDType);
const string xml(cmd.toXML());
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>");
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>ACTKUTST.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>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -26,26 +26,26 @@ void doWork()
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
AuDomainTransferRegistrantCommand cmd(
"jtkutest.com.au", // domain name
"ACTKUTST.com.au", // domain name
*curExpDate, // current expire date
"Other",
policyReason,
registrantName,
"testing");
const string xml(cmd.toXML());
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\"><extension><command 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\"><registrantTransfer><registrantTransfer xmlns=\"urn:X-au:params:xml:ns:audomain-1.0\" xsi:schemaLocation=\"urn:X-au:params:xml:ns:audomain-1.0 audomain-1.0.xsd\"><name>jtkutest.com.au</name><curExpDate>2014-01-01</curExpDate><auProperties><registrantName>AusRegistry</registrantName><eligibilityType>Other</eligibilityType><policyReason>1</policyReason></auProperties><explanation>testing</explanation></registrantTransfer></registrantTransfer><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></extension></epp>");
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\"><extension><command 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\"><registrantTransfer><registrantTransfer xmlns=\"urn:X-au:params:xml:ns:audomain-1.0\" xsi:schemaLocation=\"urn:X-au:params:xml:ns:audomain-1.0 audomain-1.0.xsd\"><name>ACTKUTST.com.au</name><curExpDate>2014-01-01</curExpDate><auProperties><registrantName>AusRegistry</registrantName><eligibilityType>Other</eligibilityType><policyReason>1</policyReason></auProperties><explanation>testing</explanation></registrantTransfer></registrantTransfer><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></extension></epp>");
}
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
Period p(2, PeriodUnit::YEARS());
AuDomainTransferRegistrantCommand cmd(
"jtkutest.com.au", // name
"ACTKUTST.com.au", // name
*curExpDate, // curExpDate
eligibilityType,
policyReason,
@ -58,7 +58,7 @@ void doWork()
&eligibilityIDType,
&p);
const string xml(cmd.toXML());
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\"><extension><command 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\"><registrantTransfer><registrantTransfer xmlns=\"urn:X-au:params:xml:ns:audomain-1.0\" xsi:schemaLocation=\"urn:X-au:params:xml:ns:audomain-1.0 audomain-1.0.xsd\"><name>jtkutest.com.au</name><curExpDate>2014-01-01</curExpDate><period unit=\"y\">2</period><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></registrantTransfer></registrantTransfer><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></extension></epp>");
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\"><extension><command 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\"><registrantTransfer><registrantTransfer xmlns=\"urn:X-au:params:xml:ns:audomain-1.0\" xsi:schemaLocation=\"urn:X-au:params:xml:ns:audomain-1.0 audomain-1.0.xsd\"><name>ACTKUTST.com.au</name><curExpDate>2014-01-01</curExpDate><period unit=\"y\">2</period><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></registrantTransfer></registrantTransfer><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></extension></epp>");
}
}

View File

@ -11,24 +11,24 @@ void doWork()
init("./etc/toolkit2.conf");
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
auto_ptr<Command> cmd(new ContactCheckCommand("JTKCON"));
const string xml(cmd->toXML());
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><check><check xmlns=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><id>JTKCON</id></check></check><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
"<?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><check><check xmlns=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><id>JTKCON</id></check></check><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
}
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
vector<string> ids;
ids.push_back("JTKCON1");
ids.push_back("JTKCON2");
auto_ptr<Command> cmd(new ContactCheckCommand(ids));
const string xml(cmd->toXML());
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><check><check xmlns=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><id>JTKCON1</id><id>JTKCON2</id></check></check><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
"<?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><check><check xmlns=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><id>JTKCON1</id><id>JTKCON2</id></check></check><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -12,12 +12,12 @@ void doWork()
{
init("./etc/toolkit2.conf");
{
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
Timer::setTime("20140101.010101");
ContactDeleteCommand cmd("JTKCON");
const string xml(cmd.toXML());
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><delete><delete xmlns=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><id>JTKCON</id></delete></delete><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
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><delete><delete xmlns=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><id>JTKCON</id></delete></delete><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -12,20 +12,20 @@ void doWork()
{
init("./etc/toolkit2.conf");
{
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
Timer::setTime("20140101.010101");
ContactInfoCommand cmd("C100000-AR");
const string xml(cmd.toXML());
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><info><info xmlns=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><id>C100000-AR</id></info></info><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
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><info><info xmlns=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><id>C100000-AR</id></info></info><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
}
{
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
Timer::setTime("20140101.010101");
ContactInfoCommand cmd("C100000-AR", "jtkUT3st");
const string xml(cmd.toXML());
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><info><info xmlns=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><id>C100000-AR</id><authInfo><pw>jtkUT3st</pw></authInfo></info></info><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
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><info><info xmlns=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><id>C100000-AR</id><authInfo><pw>jtkUT3st</pw></authInfo></info></info><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -15,10 +15,10 @@ void doWork()
init("./etc/toolkit2.conf");
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
ContactTransferRequestCommand cmd("JTKCON1", "jtkcon1pw");
const string expected("<?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><transfer op=\"request\"><transfer xmlns=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><id>JTKCON1</id><authInfo><pw>jtkcon1pw</pw></authInfo></transfer></transfer><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
const string expected("<?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><transfer op=\"request\"><transfer xmlns=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><id>JTKCON1</id><authInfo><pw>jtkcon1pw</pw></authInfo></transfer></transfer><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
const string xml(cmd.toXML());
ASSERT_EQ(expected, xml);
}

View File

@ -12,7 +12,7 @@ void doWork()
{
init("./etc/toolkit2.conf");
{
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
Timer::setTime("20140101.010101");
DomainCheckCommand cmd("test.com.au");
@ -20,7 +20,7 @@ void doWork()
ASSERT_EQ(cmd.getCommandType()->getCommandName(), "check");
ASSERT_EQ(cmd.getObjectType()->getName(), "domain");
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><check><check xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>test.com.au</name></check></check><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
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><check><check xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>test.com.au</name></check></check><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -12,12 +12,12 @@ void doWork()
{
init("./etc/toolkit2.conf");
{
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
Timer::setTime("20140101.010101");
DomainDeleteCommand cmd("jtkutest.com.au");
DomainDeleteCommand cmd("ACTKUTST.com.au");
const string xml(cmd.toXML());
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><delete><delete 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></delete></delete><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
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><delete><delete xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>ACTKUTST.com.au</name></delete></delete><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -12,12 +12,12 @@ void doWork()
{
init("./etc/toolkit2.conf");
{
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
Timer::setTime("20140101.010101");
DomainInfoCommand cmd("jtkutest.com.au");
DomainInfoCommand cmd("ACTKUTST.com.au");
const string xml(cmd.toXML());
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><info><info 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></info></info><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
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><info><info xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>ACTKUTST.com.au</name></info></info><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -19,57 +19,57 @@ const static string policyReason = "1";
void testUpdateSingleKVList()
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
DomainKVCommandExtension extension(StandardCommandType::UPDATE());
addSampleItemsToExtension(extension, "ae");
DomainUpdateCommand updateCommand("jtkutest.com.ae");
DomainUpdateCommand updateCommand("ACTKUTST.com.ae");
updateCommand.appendExtension(extension);
const string xml = updateCommand.toXML();
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.ae</name></update></update><extension><update xmlns=\"urn:X-ar:params:xml:ns:kv-1.0\"><kvlist name=\"ae\"><item key=\"eligibilityType\">Trademark</item><item key=\"policyReason\">1</item><item key=\"registrantName\">AusRegistry</item></kvlist></update></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
"<?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>ACTKUTST.com.ae</name></update></update><extension><update xmlns=\"urn:X-ar:params:xml:ns:kv-1.0\"><kvlist name=\"ae\"><item key=\"eligibilityType\">Trademark</item><item key=\"policyReason\">1</item><item key=\"registrantName\">AusRegistry</item></kvlist></update></extension><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>"
);
}
void testCreateSingleKVList()
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
DomainKVCommandExtension extension(StandardCommandType::CREATE());
addSampleItemsToExtension(extension, "ae");
string registrant("JTKCON");
DomainCreateCommand createCommand("jtkutest.com.ae", "jtkUT3st", &registrant);
DomainCreateCommand createCommand("ACTKUTST.com.ae", "jtkUT3st", &registrant);
createCommand.appendExtension(extension);
const string xml = createCommand.toXML();
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><create><create 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.ae</name><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:X-ar:params:xml:ns:kv-1.0\"><kvlist name=\"ae\"><item key=\"eligibilityType\">Trademark</item><item key=\"policyReason\">1</item><item key=\"registrantName\">AusRegistry</item></kvlist></create></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
"<?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><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>ACTKUTST.com.ae</name><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:X-ar:params:xml:ns:kv-1.0\"><kvlist name=\"ae\"><item key=\"eligibilityType\">Trademark</item><item key=\"policyReason\">1</item><item key=\"registrantName\">AusRegistry</item></kvlist></create></extension><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>"
);
}
void testMultipleKVList()
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
DomainKVCommandExtension extension(StandardCommandType::CREATE());
addSampleItemsToExtension(extension, "ae");
addSampleItemsToExtension(extension, "au");
string registrant("JTKCON");
DomainCreateCommand createCommand("jtkutest.com.ae", "jtkUT3st", &registrant);
DomainCreateCommand createCommand("ACTKUTST.com.ae", "jtkUT3st", &registrant);
createCommand.appendExtension(extension);
const string xml = createCommand.toXML();
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><create><create 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.ae</name><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:X-ar:params:xml:ns:kv-1.0\"><kvlist name=\"ae\"><item key=\"eligibilityType\">Trademark</item><item key=\"policyReason\">1</item><item key=\"registrantName\">AusRegistry</item></kvlist><kvlist name=\"au\"><item key=\"eligibilityType\">Trademark</item><item key=\"policyReason\">1</item><item key=\"registrantName\">AusRegistry</item></kvlist></create></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
"<?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><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>ACTKUTST.com.ae</name><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:X-ar:params:xml:ns:kv-1.0\"><kvlist name=\"ae\"><item key=\"eligibilityType\">Trademark</item><item key=\"policyReason\">1</item><item key=\"registrantName\">AusRegistry</item></kvlist><kvlist name=\"au\"><item key=\"eligibilityType\">Trademark</item><item key=\"policyReason\">1</item><item key=\"registrantName\">AusRegistry</item></kvlist></create></extension><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>"
);
}

View File

@ -23,17 +23,17 @@ void addSampleKVItems(DomainRegistrantTransferCommand *command);
void testWithoutPeriod()
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
auto_ptr<DomainRegistrantTransferCommand> command(
new DomainRegistrantTransferCommand("jtkutest.com.ae", *curExpDate, kvListName, "testing"));
new DomainRegistrantTransferCommand("ACTKUTST.com.ae", *curExpDate, kvListName, "testing"));
addSampleKVItems(command.get());
const std::string xml = command->toXML();
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\"><extension><command xmlns=\"urn:X-ar:params:xml:ns:registrant-1.0\"><registrantTransfer><name>jtkutest.com.ae</name><curExpDate>"
"<?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\"><extension><command xmlns=\"urn:X-ar:params:xml:ns:registrant-1.0\"><registrantTransfer><name>ACTKUTST.com.ae</name><curExpDate>"
+ EPPDateFormatter::toXSDate(*curExpDate)
+ "</curExpDate><kvlist xmlns=\"urn:X-ar:params:xml:ns:kv-1.0\" name=\"ae\"><item key=\"eligibilityIDType\">Trademark</item><item key=\"eligibilityIDValue\">1231239523</item><item key=\"eligibilityName\">Blah</item><item key=\"eligibilityType\">Trademark</item><item key=\"policyReason\">1</item><item key=\"registrantIDType\">Trade License</item><item key=\"registrantIDValue\">01241326211</item><item key=\"registrantName\">AusRegistry</item></kvlist><explanation>testing</explanation></registrantTransfer><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></extension></epp>"
+ "</curExpDate><kvlist xmlns=\"urn:X-ar:params:xml:ns:kv-1.0\" name=\"ae\"><item key=\"eligibilityIDType\">Trademark</item><item key=\"eligibilityIDValue\">1231239523</item><item key=\"eligibilityName\">Blah</item><item key=\"eligibilityType\">Trademark</item><item key=\"policyReason\">1</item><item key=\"registrantIDType\">Trade License</item><item key=\"registrantIDValue\">01241326211</item><item key=\"registrantName\">AusRegistry</item></kvlist><explanation>testing</explanation></registrantTransfer><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></extension></epp>"
);
}
@ -41,14 +41,14 @@ void testWithPeriod()
{
Period period(2, PeriodUnit::YEARS());
auto_ptr<DomainRegistrantTransferCommand> command(
new DomainRegistrantTransferCommand("jtkutest.com.ae", *curExpDate, kvListName, "testing", &period));
new DomainRegistrantTransferCommand("ACTKUTST.com.ae", *curExpDate, kvListName, "testing", &period));
addSampleKVItems(command.get());
const std::string xml = command->toXML();
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\"><extension><command xmlns=\"urn:X-ar:params:xml:ns:registrant-1.0\"><registrantTransfer><name>jtkutest.com.ae</name><curExpDate>"
"<?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\"><extension><command xmlns=\"urn:X-ar:params:xml:ns:registrant-1.0\"><registrantTransfer><name>ACTKUTST.com.ae</name><curExpDate>"
+ EPPDateFormatter::toXSDate(*curExpDate)
+ "</curExpDate><period unit=\"y\">2</period><kvlist xmlns=\"urn:X-ar:params:xml:ns:kv-1.0\" name=\"ae\"><item key=\"eligibilityIDType\">Trademark</item><item key=\"eligibilityIDValue\">1231239523</item><item key=\"eligibilityName\">Blah</item><item key=\"eligibilityType\">Trademark</item><item key=\"policyReason\">1</item><item key=\"registrantIDType\">Trade License</item><item key=\"registrantIDValue\">01241326211</item><item key=\"registrantName\">AusRegistry</item></kvlist><explanation>testing</explanation></registrantTransfer><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></extension></epp>"
+ "</curExpDate><period unit=\"y\">2</period><kvlist xmlns=\"urn:X-ar:params:xml:ns:kv-1.0\" name=\"ae\"><item key=\"eligibilityIDType\">Trademark</item><item key=\"eligibilityIDValue\">1231239523</item><item key=\"eligibilityName\">Blah</item><item key=\"eligibilityType\">Trademark</item><item key=\"policyReason\">1</item><item key=\"registrantIDType\">Trade License</item><item key=\"registrantIDValue\">01241326211</item><item key=\"registrantName\">AusRegistry</item></kvlist><explanation>testing</explanation></registrantTransfer><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></extension></epp>"
);
}

View File

@ -12,33 +12,33 @@ void doWork()
{
init("./etc/toolkit2.conf");
{
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
Timer::setTime("20140101.010101");
DomainTransferQueryCommand cmd("jtkutest.com.au");
DomainTransferQueryCommand cmd("ACTKUTST.com.au");
const string xml(cmd.toXML());
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><transfer op=\"query\"><transfer 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></transfer></transfer><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
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><transfer op=\"query\"><transfer xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>ACTKUTST.com.au</name></transfer></transfer><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
}
{
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
Timer::setTime("20140101.010101");
DomainTransferQueryCommand cmd("jtkutest.com.au", "jtkUt3st");
DomainTransferQueryCommand cmd("ACTKUTST.com.au", "jtkUt3st");
const string xml(cmd.toXML());
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><transfer op=\"query\"><transfer 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><authInfo><pw>jtkUt3st</pw></authInfo></transfer></transfer><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
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><transfer op=\"query\"><transfer xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>ACTKUTST.com.au</name><authInfo><pw>jtkUt3st</pw></authInfo></transfer></transfer><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
}
{
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
Timer::setTime("20140101.010101");
DomainTransferQueryCommand cmd("jtkutest.com.au", "C100000-AR", "jtkUt3st");
DomainTransferQueryCommand cmd("ACTKUTST.com.au", "C100000-AR", "jtkUt3st");
const string xml(cmd.toXML());
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><transfer op=\"query\"><transfer 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><authInfo><pw roid=\"C100000-AR\">jtkUt3st</pw></authInfo></transfer></transfer><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
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><transfer op=\"query\"><transfer xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>ACTKUTST.com.au</name><authInfo><pw roid=\"C100000-AR\">jtkUt3st</pw></authInfo></transfer></transfer><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -19,20 +19,20 @@ using namespace std;
void testSimpleUpdate()
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
DomainUpdateCommand cmd("jtkutest.com.au");
DomainUpdateCommand cmd("ACTKUTST.com.au");
const string xml(cmd.toXML());
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><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
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>ACTKUTST.com.au</name></update></update><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
}
void testFullUpdate()
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
const char* addNsText[] = { "ns1.jtkutest.com.au", "ns2.jtkutest.com.au" };
const char* addNsText[] = { "ns1.ACTKUTST.com.au", "ns2.ACTKUTST.com.au" };
const vector<string> addNs(addNsText, addNsText + 2);
const vector<string> addTechContacts(1, "JTKCON");
@ -54,7 +54,7 @@ void testFullUpdate()
&addStatus);
const char* remNsText[] = { "ns3.jtkutest.com.au", "ns4.jtkutest.com.au" };
const char* remNsText[] = { "ns3.ACTKUTST.com.au", "ns4.ACTKUTST.com.au" };
const vector<string> remNs(remNsText, remNsText + 2);
const vector<string> remTechContacts(1, "JTKCON2");
@ -70,22 +70,22 @@ void testFullUpdate()
NULL,
&remStatus);
const string name("jtkutest.com.au");
const string name("ACTKUTST.com.au");
const string pw("jtkUT3st");
const string registrantID("JTKCON");
DomainUpdateCommand cmd("jtkutest.com.au", &pw, &add, &rem, &registrantID);
DomainUpdateCommand cmd("ACTKUTST.com.au", &pw, &add, &rem, &registrantID);
const string xml(cmd.toXML());
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><add><ns><hostObj>ns1.jtkutest.com.au</hostObj><hostObj>ns2.jtkutest.com.au</hostObj></ns><contact type=\"tech\">JTKCON</contact><contact type=\"admin\">JTKCON2</contact><contact type=\"billing\">JTKCON3</contact><status s=\"clientHold\">non-payment</status></add><rem><ns><hostObj>ns3.jtkutest.com.au</hostObj><hostObj>ns4.jtkutest.com.au</hostObj></ns><contact type=\"tech\">JTKCON2</contact><contact type=\"admin\">JTKCON</contact><status s=\"clientDeleteProhibited\"></status></rem><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
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>ACTKUTST.com.au</name><add><ns><hostObj>ns1.ACTKUTST.com.au</hostObj><hostObj>ns2.ACTKUTST.com.au</hostObj></ns><contact type=\"tech\">JTKCON</contact><contact type=\"admin\">JTKCON2</contact><contact type=\"billing\">JTKCON3</contact><status s=\"clientHold\">non-payment</status></add><rem><ns><hostObj>ns3.ACTKUTST.com.au</hostObj><hostObj>ns4.ACTKUTST.com.au</hostObj></ns><contact type=\"tech\">JTKCON2</contact><contact type=\"admin\">JTKCON</contact><status s=\"clientDeleteProhibited\"></status></rem><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
}
void testSyncExpiryDateExtension(void)
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
DomainUpdateCommand cmd("jtkutest.com.au");
DomainUpdateCommand cmd("ACTKUTST.com.au");
XMLGC::XMLGregorianCalendar *newExpiryDate = EPPDateFormatter::fromXSDateTime("2005-04-03T22:00:00.0Z");
DomainUpdateSyncCommandExtension extension(newExpiryDate);
@ -94,7 +94,7 @@ void testSyncExpiryDateExtension(void)
delete newExpiryDate;
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-ar:params:xml:ns:sync-1.0\"><exDate>2005-04-03T22:00:00.0Z</exDate></update></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
"<?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>ACTKUTST.com.au</name></update></update><extension><update xmlns=\"urn:X-ar:params:xml:ns:sync-1.0\"><exDate>2005-04-03T22:00:00.0Z</exDate></update></extension><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
}
void testSyncExpiryDateExtensionWithNullDate(void)

View File

@ -10,7 +10,7 @@ using namespace std;
void doWork()
{
init("./etc/toolkit2.conf");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
Hello cmd;
const string xml(cmd.toXML());

View File

@ -12,23 +12,23 @@ void doWork()
{
init("./etc/toolkit2.conf");
{
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
Timer::setTime("20140101.010101");
HostCheckCommand hcc("ns1.jtkutest.com.au");
HostCheckCommand hcc("ns1.ACTKUTST.com.au");
const string xml(hcc.toXML());
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><check><check xmlns=\"urn:ietf:params:xml:ns:host-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:host-1.0 host-1.0.xsd\"><name>ns1.jtkutest.com.au</name></check></check><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
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><check><check xmlns=\"urn:ietf:params:xml:ns:host-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:host-1.0 host-1.0.xsd\"><name>ns1.ACTKUTST.com.au</name></check></check><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
}
{
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
Timer::setTime("20140101.010101");
std::vector<std::string> names;
names.push_back("ns1.jtkutest.com.au");
names.push_back("ns2.jtkutest.com.au");
names.push_back("ns1.ACTKUTST.com.au");
names.push_back("ns2.ACTKUTST.com.au");
HostCheckCommand hcc(names);
const string xml(hcc.toXML());
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><check><check xmlns=\"urn:ietf:params:xml:ns:host-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:host-1.0 host-1.0.xsd\"><name>ns1.jtkutest.com.au</name><name>ns2.jtkutest.com.au</name></check></check><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
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><check><check xmlns=\"urn:ietf:params:xml:ns:host-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:host-1.0 host-1.0.xsd\"><name>ns1.ACTKUTST.com.au</name><name>ns2.ACTKUTST.com.au</name></check></check><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -12,25 +12,25 @@ void doWork()
{
init("./etc/toolkit2.conf");
{
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
Timer::setTime("20140101.010101");
HostCreateCommand hcc("ns1.jtkutest.com.au");
HostCreateCommand hcc("ns1.ACTKUTST.com.au");
const string xml(hcc.toXML());
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><create><create xmlns=\"urn:ietf:params:xml:ns:host-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:host-1.0 host-1.0.xsd\"><name>ns1.jtkutest.com.au</name></create></create><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
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><create><create xmlns=\"urn:ietf:params:xml:ns:host-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:host-1.0 host-1.0.xsd\"><name>ns1.ACTKUTST.com.au</name></create></create><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
}
{
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
Timer::setTime("20140101.010101");
vector<InetAddress> addrs;
addrs.push_back(InetAddress("192.168.0.1", IPVersion::IPv4()));
addrs.push_back(InetAddress("::1", IPVersion::IPv6()));
HostCreateCommand hcc("ns1.jtkutest.com.au", &addrs);
HostCreateCommand hcc("ns1.ACTKUTST.com.au", &addrs);
const string xml(hcc.toXML());
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><create><create xmlns=\"urn:ietf:params:xml:ns:host-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:host-1.0 host-1.0.xsd\"><name>ns1.jtkutest.com.au</name><addr ip=\"v4\">192.168.0.1</addr><addr ip=\"v6\">::1</addr></create></create><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
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><create><create xmlns=\"urn:ietf:params:xml:ns:host-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:host-1.0 host-1.0.xsd\"><name>ns1.ACTKUTST.com.au</name><addr ip=\"v4\">192.168.0.1</addr><addr ip=\"v6\">::1</addr></create></create><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -12,11 +12,11 @@ void doWork()
{
init("./etc/toolkit2.conf");
{
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
Timer::setTime("20140101.010101");
HostDeleteCommand hcc("ns1.jtkutest.com.au");
HostDeleteCommand hcc("ns1.ACTKUTST.com.au");
const string xml(hcc.toXML());
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><delete><delete xmlns=\"urn:ietf:params:xml:ns:host-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:host-1.0 host-1.0.xsd\"><name>ns1.jtkutest.com.au</name></delete></delete><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
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><delete><delete xmlns=\"urn:ietf:params:xml:ns:host-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:host-1.0 host-1.0.xsd\"><name>ns1.ACTKUTST.com.au</name></delete></delete><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -10,11 +10,11 @@ void doWork()
{
init("./etc/toolkit2.conf");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
HostInfoCommand cmd("ns1.jtkutest.com.au");
HostInfoCommand cmd("ns1.ACTKUTST.com.au");
const string xml = cmd.toXML();
ASSERT_EQ("<?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><info><info xmlns=\"urn:ietf:params:xml:ns:host-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:host-1.0 host-1.0.xsd\"><name>ns1.jtkutest.com.au</name></info></info><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>", xml);
ASSERT_EQ("<?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><info><info xmlns=\"urn:ietf:params:xml:ns:host-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:host-1.0 host-1.0.xsd\"><name>ns1.ACTKUTST.com.au</name></info></info><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>", xml);
}
int main(int argc, char* argv[])

View File

@ -22,38 +22,38 @@ void doWork()
init("./etc/toolkit2.conf");
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
LoginCommand cmd("JTKUTEST", "1234abcd!@#$JTK");
LoginCommand cmd("ACTKUTST", "1234abcd!@#$JTK");
const string xml(cmd.toXML());
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><login><clID>JTKUTEST</clID><pw>1234abcd!@#$JTK</pw><options><version>1.0</version><lang>en</lang></options><svcs><objURI>urn:ietf:params:xml:ns:domain-1.0</objURI><objURI>urn:ietf:params:xml:ns:host-1.0</objURI><objURI>urn:ietf:params:xml:ns:contact-1.0</objURI></svcs></login><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
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><login><clID>ACTKUTST</clID><pw>1234abcd!@#$JTK</pw><options><version>1.0</version><lang>en</lang></options><svcs><objURI>urn:ietf:params:xml:ns:domain-1.0</objURI><objURI>urn:ietf:params:xml:ns:host-1.0</objURI><objURI>urn:ietf:params:xml:ns:contact-1.0</objURI></svcs></login><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
}
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
LoginCommand cmd("JTKUTEST", "1234abcd!@#$JTK", objURIs, extURIs);
LoginCommand cmd("ACTKUTST", "1234abcd!@#$JTK", objURIs, extURIs);
const string xml(cmd.toXML());
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><login><clID>JTKUTEST</clID><pw>1234abcd!@#$JTK</pw><options><version>1.0</version><lang>en</lang></options><svcs><objURI>urn:ietf:params:xml:ns:domain-1.0</objURI><objURI>urn:ietf:params:xml:ns:host-1.0</objURI><objURI>urn:ietf:params:xml:ns:contact-1.0</objURI><svcExtension><extURI>urn:au:params:xml:ns:auext-1.0</extURI></svcExtension></svcs></login><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
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><login><clID>ACTKUTST</clID><pw>1234abcd!@#$JTK</pw><options><version>1.0</version><lang>en</lang></options><svcs><objURI>urn:ietf:params:xml:ns:domain-1.0</objURI><objURI>urn:ietf:params:xml:ns:host-1.0</objURI><objURI>urn:ietf:params:xml:ns:contact-1.0</objURI><svcExtension><extURI>urn:au:params:xml:ns:auext-1.0</extURI></svcExtension></svcs></login><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
}
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
LoginCommand cmd("JTKUTEST", "1234abcd!@#$JTK", "1.0", "fr", objURIs, extURIs);
CLTRID::setClID("ACTKUTST");
LoginCommand cmd("ACTKUTST", "1234abcd!@#$JTK", "1.0", "fr", objURIs, extURIs);
const string xml(cmd.toXML());
ASSERT_EQ("<?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><login><clID>JTKUTEST</clID><pw>1234abcd!@#$JTK</pw><options><version>1.0</version><lang>fr</lang></options><svcs><objURI>urn:ietf:params:xml:ns:domain-1.0</objURI><objURI>urn:ietf:params:xml:ns:host-1.0</objURI><objURI>urn:ietf:params:xml:ns:contact-1.0</objURI><svcExtension><extURI>urn:au:params:xml:ns:auext-1.0</extURI></svcExtension></svcs></login><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>", xml);
ASSERT_EQ("<?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><login><clID>ACTKUTST</clID><pw>1234abcd!@#$JTK</pw><options><version>1.0</version><lang>fr</lang></options><svcs><objURI>urn:ietf:params:xml:ns:domain-1.0</objURI><objURI>urn:ietf:params:xml:ns:host-1.0</objURI><objURI>urn:ietf:params:xml:ns:contact-1.0</objURI><svcExtension><extURI>urn:au:params:xml:ns:auext-1.0</extURI></svcExtension></svcs></login><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>", xml);
}
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
const string newPw("n(-w18PW*");
LoginCommand cmd("JTKUTEST", "1234abcd!@#$JTK", &newPw, "1.0", "fr", objURIs, extURIs);
LoginCommand cmd("ACTKUTST", "1234abcd!@#$JTK", &newPw, "1.0", "fr", objURIs, extURIs);
const string xml(cmd.toXML());
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><login><clID>JTKUTEST</clID><pw>1234abcd!@#$JTK</pw><newPW>n(-w18PW*</newPW><options><version>1.0</version><lang>fr</lang></options><svcs><objURI>urn:ietf:params:xml:ns:domain-1.0</objURI><objURI>urn:ietf:params:xml:ns:host-1.0</objURI><objURI>urn:ietf:params:xml:ns:contact-1.0</objURI><svcExtension><extURI>urn:au:params:xml:ns:auext-1.0</extURI></svcExtension></svcs></login><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
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><login><clID>ACTKUTST</clID><pw>1234abcd!@#$JTK</pw><newPW>n(-w18PW*</newPW><options><version>1.0</version><lang>fr</lang></options><svcs><objURI>urn:ietf:params:xml:ns:domain-1.0</objURI><objURI>urn:ietf:params:xml:ns:host-1.0</objURI><objURI>urn:ietf:params:xml:ns:contact-1.0</objURI><svcExtension><extURI>urn:au:params:xml:ns:auext-1.0</extURI></svcExtension></svcs></login><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -12,13 +12,13 @@ void doWork()
{
init("./etc/toolkit2.conf");
{
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
Timer::setTime("20140101.010101");
LogoutCommand cmd;
const string xml(cmd.toXML());
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><logout/><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
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><logout/><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -10,11 +10,11 @@ void doWork()
{
init("./etc/toolkit2.conf");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
PollAckCommand cmd(123);
const string xml = cmd.toXML();
ASSERT_EQ("<?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><poll msgID=\"123\" op=\"ack\"/><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>", xml);
ASSERT_EQ("<?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><poll msgID=\"123\" op=\"ack\"/><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>", xml);
}
int main(int argc, char* argv[])

View File

@ -25,13 +25,13 @@ void doWork()
void testContactTransferApprovePoll()
{
const string xml =
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><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\"><response><result code=\"1301\"><msg>Command completed successfully; ack to dequeue</msg></result><msgQ count=\"5\" id=\"12345\"><qDate>2000-06-08T22:00:00.0Z</qDate><msg lang=\"en\">Transfer requested.</msg></msgQ><resData><contact:trnData xmlns:contact=\"urn:ietf:params:xml:ns:contact-1.0\"><contact:id>JTKUTEST</contact:id><contact:trStatus>pending</contact:trStatus><contact:reID>ClientX</contact:reID><contact:reDate>2000-06-08T22:00:00.0Z</contact:reDate><contact:acID>ClientY</contact:acID><contact:acDate>2000-06-13T22:00:00.0Z</contact:acDate></contact:trnData></resData><trID><clTRID>ABC-12345</clTRID><svTRID>54321-XYZ</svTRID></trID></response></epp>";
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><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\"><response><result code=\"1301\"><msg>Command completed successfully; ack to dequeue</msg></result><msgQ count=\"5\" id=\"12345\"><qDate>2000-06-08T22:00:00.0Z</qDate><msg lang=\"en\">Transfer requested.</msg></msgQ><resData><contact:trnData xmlns:contact=\"urn:ietf:params:xml:ns:contact-1.0\"><contact:id>ACTKUTST</contact:id><contact:trStatus>pending</contact:trStatus><contact:reID>ClientX</contact:reID><contact:reDate>2000-06-08T22:00:00.0Z</contact:reDate><contact:acID>ClientY</contact:acID><contact:acDate>2000-06-13T22:00:00.0Z</contact:acDate></contact:trnData></resData><trID><clTRID>ABC-12345</clTRID><svTRID>54321-XYZ</svTRID></trID></response></epp>";
PollResponse& response(getPollResponse(xml));
const ContactTransferResponse* ctr = response.getContactTransferResponse();
ASSERT(ctr != NULL);
ASSERT_EQ("JTKUTEST", ctr->getID());
ASSERT_EQ("ACTKUTST", ctr->getID());
ASSERT_EQ("pending", ctr->getTransferStatus());
ASSERT_EQ("ClientX", ctr->getRequestingClID());
ASSERT_EQ("ClientY", ctr->getActioningClID());

View File

@ -9,7 +9,7 @@ Logger* ReceiveSE::debugLogger;
void ReceiveSE::init()
{
std::string pname = "com.ausregistry.cpptoolkit.se";
std::string pname = "biz.meansofproduction.dnseppus.se";
maintLogger = Logger::getLogger(pname + ".maint");
supportLogger = Logger::getLogger(pname + ".support");
userLogger = Logger::getLogger(pname + ".user");

View File

@ -49,5 +49,5 @@ SendSE::~SendSE()
void SendSE::init ()
{
userLogger = Logger::getLogger("com.ausregistry.cpptoolkit.se.user");
userLogger = Logger::getLogger("biz.meansofproduction.dnseppus.se.user");
}

View File

@ -14,9 +14,9 @@ using namespace std;
void testSecDNSAllFields()
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
DomainCreateCommand createCommand("jtkutest.com.au", "jtkUT3st", NULL);
DomainCreateCommand createCommand("ACTKUTST.com.au", "jtkUT3st", NULL);
auto_ptr<SecDNSDSData> dsData(new SecDNSDSData(12345, 3, 1, "49FD46E6C4B45C55D4AC"));
auto_ptr<SecDNSKeyData> keyData(new SecDNSKeyData(256, 3, 1, "AQPJ////4Q=="));
@ -34,16 +34,16 @@ void testSecDNSAllFields()
const string xml = createCommand.toXML();
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><create><create 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><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\"><maxSigLife>604800</maxSigLife><dsData><keyTag>12345</keyTag><alg>3</alg><digestType>1</digestType><digest>49FD46E6C4B45C55D4AC</digest><keyData><flags>256</flags><protocol>3</protocol><alg>1</alg><pubKey>AQPJ////4Q==</pubKey></keyData></dsData></create></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
"<?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><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>ACTKUTST.com.au</name><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\"><maxSigLife>604800</maxSigLife><dsData><keyTag>12345</keyTag><alg>3</alg><digestType>1</digestType><digest>49FD46E6C4B45C55D4AC</digest><keyData><flags>256</flags><protocol>3</protocol><alg>1</alg><pubKey>AQPJ////4Q==</pubKey></keyData></dsData></create></extension><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>"
);
}
void testSecDNSMultipleDSDataWithoutMaxSigLife()
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
DomainCreateCommand createCommand("jtkutest.com.au", "jtkUT3st", NULL);
DomainCreateCommand createCommand("ACTKUTST.com.au", "jtkUT3st", NULL);
auto_ptr<SecDNSDSData> dsData(new SecDNSDSData(12345, 3, 1, "38FD46E6C4B45C55D4AC"));
auto_ptr<SecDNSKeyData> keyData(new SecDNSKeyData(256, 3, 1, "AQPJ////4Q=="));
@ -62,16 +62,16 @@ void testSecDNSMultipleDSDataWithoutMaxSigLife()
const string xml = createCommand.toXML();
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><create><create 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><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\"><dsData><keyTag>12345</keyTag><alg>3</alg><digestType>1</digestType><digest>38FD46E6C4B45C55D4AC</digest><keyData><flags>256</flags><protocol>3</protocol><alg>1</alg><pubKey>AQPJ////4Q==</pubKey></keyData></dsData><dsData><keyTag>6789</keyTag><alg>2</alg><digestType>2</digestType><digest>49FD46E6C4B45C55D4AC</digest></dsData></create></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
"<?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><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>ACTKUTST.com.au</name><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\"><dsData><keyTag>12345</keyTag><alg>3</alg><digestType>1</digestType><digest>38FD46E6C4B45C55D4AC</digest><keyData><flags>256</flags><protocol>3</protocol><alg>1</alg><pubKey>AQPJ////4Q==</pubKey></keyData></dsData><dsData><keyTag>6789</keyTag><alg>2</alg><digestType>2</digestType><digest>49FD46E6C4B45C55D4AC</digest></dsData></create></extension><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>"
);
}
void testSecDNSAllFieldsMin()
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
DomainCreateCommand createCommand("jtkutest.com.au", "jtkUT3st", NULL);
DomainCreateCommand createCommand("ACTKUTST.com.au", "jtkUT3st", NULL);
auto_ptr<SecDNSDSData> dsData(new SecDNSDSData(0, 0, 0, "49FD46E6C4B45C55D4AC"));
auto_ptr<SecDNSKeyData> keyData(new SecDNSKeyData(0, 0, 0, "AQPJ////4Q=="));
@ -89,16 +89,16 @@ void testSecDNSAllFieldsMin()
const string xml = createCommand.toXML();
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><create><create 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><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\"><maxSigLife>1</maxSigLife><dsData><keyTag>0</keyTag><alg>0</alg><digestType>0</digestType><digest>49FD46E6C4B45C55D4AC</digest><keyData><flags>0</flags><protocol>0</protocol><alg>0</alg><pubKey>AQPJ////4Q==</pubKey></keyData></dsData></create></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
"<?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><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>ACTKUTST.com.au</name><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\"><maxSigLife>1</maxSigLife><dsData><keyTag>0</keyTag><alg>0</alg><digestType>0</digestType><digest>49FD46E6C4B45C55D4AC</digest><keyData><flags>0</flags><protocol>0</protocol><alg>0</alg><pubKey>AQPJ////4Q==</pubKey></keyData></dsData></create></extension><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>"
);
}
void testSecDNSAllFieldsMax()
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
DomainCreateCommand createCommand("jtkutest.com.au", "jtkUT3st", NULL);
DomainCreateCommand createCommand("ACTKUTST.com.au", "jtkUT3st", NULL);
auto_ptr<SecDNSDSData> dsData(new SecDNSDSData(65535, 255, 255, "49FD46E6C4B45C55D4AC"));
auto_ptr<SecDNSKeyData> keyData(new SecDNSKeyData(65535, 255, 255, "AQPJ////4Q=="));
@ -116,16 +116,16 @@ void testSecDNSAllFieldsMax()
const string xml = createCommand.toXML();
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><create><create 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><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\"><maxSigLife>2147483647</maxSigLife><dsData><keyTag>65535</keyTag><alg>255</alg><digestType>255</digestType><digest>49FD46E6C4B45C55D4AC</digest><keyData><flags>65535</flags><protocol>255</protocol><alg>255</alg><pubKey>AQPJ////4Q==</pubKey></keyData></dsData></create></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
"<?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><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>ACTKUTST.com.au</name><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\"><maxSigLife>2147483647</maxSigLife><dsData><keyTag>65535</keyTag><alg>255</alg><digestType>255</digestType><digest>49FD46E6C4B45C55D4AC</digest><keyData><flags>65535</flags><protocol>255</protocol><alg>255</alg><pubKey>AQPJ////4Q==</pubKey></keyData></dsData></create></extension><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>"
);
}
void testSecDNSJustKeyData()
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
DomainCreateCommand createCommand("jtkutest.com.au", "jtkUT3st", NULL);
DomainCreateCommand createCommand("ACTKUTST.com.au", "jtkUT3st", NULL);
auto_ptr<SecDNSKeyData> keyData(new SecDNSKeyData(65535, 255, 255, "AQPJ////4Q=="));
@ -141,7 +141,7 @@ void testSecDNSJustKeyData()
const string xml = createCommand.toXML();
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><create><create 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><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\"><maxSigLife>65535</maxSigLife><keyData><flags>65535</flags><protocol>255</protocol><alg>255</alg><pubKey>AQPJ////4Q==</pubKey></keyData></create></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
"<?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><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>ACTKUTST.com.au</name><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\"><maxSigLife>65535</maxSigLife><keyData><flags>65535</flags><protocol>255</protocol><alg>255</alg><pubKey>AQPJ////4Q==</pubKey></keyData></create></extension><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>"
);
}

View File

@ -14,11 +14,11 @@ using namespace std;
void testSecDNSAddFieldsUrgent()
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
string passwd = "jtkUT3st";
string registrantID = "JTKCON";
DomainUpdateCommand updateCommand("jtkutest.com.au", &passwd, NULL, NULL, &registrantID);
DomainUpdateCommand updateCommand("ACTKUTST.com.au", &passwd, NULL, NULL, &registrantID);
auto_ptr<SecDNSDSData> dsData(new SecDNSDSData(12345, 3, 1, "49FD46E6C4B45C55D4AC"));
auto_ptr<SecDNSKeyData> keyData(new SecDNSKeyData(256, 3, 1, "AQPJ////4Q=="));
@ -37,18 +37,18 @@ void testSecDNSAddFieldsUrgent()
const string xml = updateCommand.toXML();
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><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><extension><update xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\" urgent=\"true\"><add><maxSigLife>604800</maxSigLife><dsData><keyTag>12345</keyTag><alg>3</alg><digestType>1</digestType><digest>49FD46E6C4B45C55D4AC</digest><keyData><flags>256</flags><protocol>3</protocol><alg>1</alg><pubKey>AQPJ////4Q==</pubKey></keyData></dsData></add></update></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
"<?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>ACTKUTST.com.au</name><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><extension><update xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\" urgent=\"true\"><add><maxSigLife>604800</maxSigLife><dsData><keyTag>12345</keyTag><alg>3</alg><digestType>1</digestType><digest>49FD46E6C4B45C55D4AC</digest><keyData><flags>256</flags><protocol>3</protocol><alg>1</alg><pubKey>AQPJ////4Q==</pubKey></keyData></dsData></add></update></extension><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>"
);
}
void testSecDNSRemoveFieldsNotUrgent()
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
string passwd = "jtkUT3st";
string registrantID = "JTKCON";
DomainUpdateCommand updateCommand("jtkutest.com.au", &passwd, NULL, NULL, &registrantID);
DomainUpdateCommand updateCommand("ACTKUTST.com.au", &passwd, NULL, NULL, &registrantID);
auto_ptr<SecDNSDSData> dsData(new SecDNSDSData(65535, 255, 255, "49FD46E6C4B45C55D4AC"));
auto_ptr<SecDNSKeyData> keyData(new SecDNSKeyData(65535, 255, 255, "AQPJ////4Q=="));
@ -65,18 +65,18 @@ void testSecDNSRemoveFieldsNotUrgent()
const string xml = updateCommand.toXML();
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><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><extension><update xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\"><rem><dsData><keyTag>65535</keyTag><alg>255</alg><digestType>255</digestType><digest>49FD46E6C4B45C55D4AC</digest><keyData><flags>65535</flags><protocol>255</protocol><alg>255</alg><pubKey>AQPJ////4Q==</pubKey></keyData></dsData></rem></update></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
"<?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>ACTKUTST.com.au</name><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><extension><update xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\"><rem><dsData><keyTag>65535</keyTag><alg>255</alg><digestType>255</digestType><digest>49FD46E6C4B45C55D4AC</digest><keyData><flags>65535</flags><protocol>255</protocol><alg>255</alg><pubKey>AQPJ////4Q==</pubKey></keyData></dsData></rem></update></extension><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>"
);
}
void testSecDNSRemoveAll()
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
string passwd = "jtkUT3st";
string registrantID = "JTKCON";
DomainUpdateCommand updateCommand("jtkutest.com.au", &passwd, NULL, NULL, &registrantID);
DomainUpdateCommand updateCommand("ACTKUTST.com.au", &passwd, NULL, NULL, &registrantID);
auto_ptr<SecDNSRemType> remData(new SecDNSRemType());
@ -90,18 +90,18 @@ void testSecDNSRemoveAll()
const string xml = updateCommand.toXML();
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><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><extension><update xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\" urgent=\"true\"><rem><all>true</all></rem></update></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
"<?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>ACTKUTST.com.au</name><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><extension><update xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\" urgent=\"true\"><rem><all>true</all></rem></update></extension><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>"
);
}
void testSecDNSRemoveAllAndAddDsData()
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
string passwd = "jtkUT3st";
string registrantID = "JTKCON";
DomainUpdateCommand updateCommand("jtkutest.com.au", &passwd, NULL, NULL, &registrantID);
DomainUpdateCommand updateCommand("ACTKUTST.com.au", &passwd, NULL, NULL, &registrantID);
auto_ptr<SecDNSRemType> remData(new SecDNSRemType());
@ -120,18 +120,18 @@ void testSecDNSRemoveAllAndAddDsData()
const string xml = updateCommand.toXML();
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><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><extension><update xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\" urgent=\"true\"><rem><all>true</all></rem><add><dsData><keyTag>65535</keyTag><alg>255</alg><digestType>255</digestType><digest>49FD46E6C4B45C55D4AC</digest></dsData></add></update></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
"<?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>ACTKUTST.com.au</name><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><extension><update xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\" urgent=\"true\"><rem><all>true</all></rem><add><dsData><keyTag>65535</keyTag><alg>255</alg><digestType>255</digestType><digest>49FD46E6C4B45C55D4AC</digest></dsData></add></update></extension><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>"
);
}
void testSecDNSRemoveAllAndAddKeyData()
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
string passwd = "jtkUT3st";
string registrantID = "JTKCON";
DomainUpdateCommand updateCommand("jtkutest.com.au", &passwd, NULL, NULL, &registrantID);
DomainUpdateCommand updateCommand("ACTKUTST.com.au", &passwd, NULL, NULL, &registrantID);
auto_ptr<SecDNSRemType> remData(new SecDNSRemType());
@ -150,18 +150,18 @@ void testSecDNSRemoveAllAndAddKeyData()
const string xml = updateCommand.toXML();
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><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><extension><update xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\" urgent=\"true\"><rem><all>true</all></rem><add><keyData><flags>65535</flags><protocol>255</protocol><alg>255</alg><pubKey>AQPJ////4Q==</pubKey></keyData></add></update></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
"<?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>ACTKUTST.com.au</name><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><extension><update xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\" urgent=\"true\"><rem><all>true</all></rem><add><keyData><flags>65535</flags><protocol>255</protocol><alg>255</alg><pubKey>AQPJ////4Q==</pubKey></keyData></add></update></extension><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>"
);
}
void testSecDNSRemoveAllAndAddKeyDataAndChangeMaxSigLife()
{
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
CLTRID::setClID("ACTKUTST");
string passwd = "jtkUT3st";
string registrantID = "JTKCON";
DomainUpdateCommand updateCommand("jtkutest.com.au", &passwd, NULL, NULL, &registrantID);
DomainUpdateCommand updateCommand("ACTKUTST.com.au", &passwd, NULL, NULL, &registrantID);
auto_ptr<SecDNSRemType> remData(new SecDNSRemType());
@ -185,7 +185,7 @@ void testSecDNSRemoveAllAndAddKeyDataAndChangeMaxSigLife()
const string xml = updateCommand.toXML();
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><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><extension><update xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\" urgent=\"true\"><rem><all>true</all></rem><add><keyData><flags>65535</flags><protocol>255</protocol><alg>255</alg><pubKey>AQPJ////4Q==</pubKey></keyData></add><chg><maxSigLife>604800</maxSigLife></chg></update></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
"<?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>ACTKUTST.com.au</name><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><extension><update xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\" urgent=\"true\"><rem><all>true</all></rem><add><keyData><flags>65535</flags><protocol>255</protocol><alg>255</alg><pubKey>AQPJ////4Q==</pubKey></keyData></add><chg><maxSigLife>604800</maxSigLife></chg></update></extension><clTRID>ACTKUTST.20140101.010101.0</clTRID></command></epp>"
);
}

View File

@ -23,7 +23,7 @@
using namespace std;
string SessionManagerImpl::pname("com.ausregistry.cpptoolkit.session");
string SessionManagerImpl::pname("biz.meansofproduction.dnseppus.session");
SessionManagerImpl::SessionManagerImpl(SessionManagerProperties* props)
throw (ConfigurationException)

View File

@ -23,7 +23,7 @@
using namespace std;
const float SessionPoolImpl::PI_STO_FRACT = 0.4;
const string SessionPoolImpl::pname("com.ausregistry.cpptoolkit.session");
const string SessionPoolImpl::pname("biz.meansofproduction.dnseppus.session");
SessionPoolImpl::SessionPoolImpl(SessionPoolProperties* props)

View File

@ -51,7 +51,7 @@ TLSSession::TLSSession(SessionProperties* props)
pthread_cond_init(&cond, NULL);
configure(props);
const string pname("com.ausregistry.cpptoolkit.session");
const string pname("biz.meansofproduction.dnseppus.session");
debugLogger = Logger::getLogger(pname + ".debug");
supportLogger = Logger::getLogger(pname + ".support");
userLogger = Logger::getLogger(pname + ".user");

View File

@ -31,7 +31,7 @@ namespace {
public:
ErrorHandlerImpl()
{
userLogger = Logger::getLogger("com.ausregistry.cpptoolkit.xml.user");
userLogger = Logger::getLogger("biz.meansofproduction.dnseppus.xml.user");
}
void warning(const SAXParseException& e)

View File

@ -28,7 +28,7 @@ string xmlProlog(const string& version, const string& enc)
void XMLWriter::init()
{
const string pname("com.ausregistry.cpptoolkit.xml");
const string pname("biz.meansofproduction.dnseppus.xml");
debugLogger = Logger::getLogger(pname + ".debug");
userLogger = Logger::getLogger(pname + ".user");
}