public class EPPRegistryTst
extends junit.framework.TestCase
Constructor and Description |
---|
EPPRegistryTst(java.lang.String name)
Allocates an
EPPRegistryTst with a logical name. |
Modifier and Type | Method and Description |
---|---|
static EPPRegistryContact |
buildContact()
Build a populated contact object policy object to include in a zone.
|
static EPPRegistryDomain |
buildDomain()
Build a populated domain object policy object to include in a zone with
the DS Data Interface.
|
static EPPRegistryDomain |
buildDomain(boolean aDsDataInterface,
boolean aHostObjModel)
Build a populated domain object policy object to include in a zone.
|
static EPPRegistryHost |
buildHost(boolean aHostObjModel)
Build a populated host object policy object to include in a zone.
|
static EPPRegistryZone |
buildZoneInfo(EPPRegistryZoneName aZone,
boolean aContactPolicy,
boolean aDsDataInterface,
boolean aHostObjModel)
Creates a populated
EPPRegistryZone instance given a zone name. |
void |
handleException(java.lang.Exception aException)
Handle an
EPPCommandException , which can be either a server
generated error or a general exception. |
java.lang.String |
makeZoneName()
Make a pseudo random zone name.
|
void |
registryCheck(java.util.Map aZoneNames)
Unit test of
EPPRegistry.sendCheck . |
void |
registryCreate(java.lang.String aZoneName,
boolean aShouldSucceed)
Unit test of
EPPRegistry.sendCreate . |
void |
registryDelete(java.lang.String aZoneName,
boolean aShouldSucceed)
Unit test of
EPPRegistry.sendDelete . |
void |
registryInfo(EPPRegistryInfoCmd.Mode aMode,
java.lang.String aZoneName,
EPPRegistryInfoCmd.Scope aScope)
Test for the registry info command that supports the three forms of
getting detailed information for an individual zone by setting the
aZoneName parameter to a non-null value, getting a summary
of all zones by setting the aScope parameter to a non-null
value, and getting the system information by setting the aSystem
parameter to true. |
void |
registryUpdate(java.lang.String aZoneName,
boolean aShouldSucceed)
Unit test of
EPPRegistry.sendUpdate . |
protected void |
setUp()
Setup the test by establishing an EPP session with the server.
|
static junit.framework.Test |
suite() |
protected void |
tearDown()
JUNIT
tearDown , which currently does nothing. |
void |
testRegistry()
Test the Registry Mapping by doing the following:
Create a set of zones.
Update a zone.
Check the availability (existence) of the zones.
Get all summary information for the zones.
Get detailed zone information for some zones.
Get registry system information.
Delete a set of zones.
|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
public EPPRegistryTst(java.lang.String name)
EPPRegistryTst
with a logical name. The constructor
will initialize the base class TestCase
with the logical name.name
- Logical name of the testpublic void testRegistry()
public void registryCheck(java.util.Map aZoneNames)
EPPRegistry.sendCheck
.aZoneNames
- Zone names to checkpublic void registryCreate(java.lang.String aZoneName, boolean aShouldSucceed)
EPPRegistry.sendCreate
.aZoneName
- Name of zone to createaShouldSucceed
- is the test expected to succeed?public void registryDelete(java.lang.String aZoneName, boolean aShouldSucceed)
EPPRegistry.sendDelete
.aZoneName
- Name of zone to deleteaShouldSucceed
- is the test expected to succeed?public void registryUpdate(java.lang.String aZoneName, boolean aShouldSucceed)
EPPRegistry.sendUpdate
.aZoneName
- Name of zone to updateaShouldSucceed
- is the test expected to succeed?public void registryInfo(EPPRegistryInfoCmd.Mode aMode, java.lang.String aZoneName, EPPRegistryInfoCmd.Scope aScope)
aZoneName
parameter to a non-null
value, getting a summary
of all zones by setting the aScope
parameter to a non-null
value, and getting the system information by setting the aSystem
parameter to true. There can be only one form used as a time.aMode
- One of the support info modes (
EPPRegistryInfoCmd.Mode.name
,
EPPRegistryInfoCmd.Mode.all
, or
EPPRegistryInfoCmd.Mode.system
)aZoneName
- Used with the "name" info mode that represents the zone name to
query. Set to null
with the
EPPRegistryInfoCmd.Mode.all
or
EPPRegistryInfoCmd.Mode.system
modes.aScope
- Used with the "all" info mode that represents the scope of the
zones to query. Set to null
with the
EPPRegistryInfoCmd.Mode.name
or
EPPRegistryInfoCmd.Mode.system
modes.public java.lang.String makeZoneName()
public void handleException(java.lang.Exception aException)
EPPCommandException
, which can be either a server
generated error or a general exception. If the exception was caused by a
server error, "Server Error :<Response XML>" will be specified. If
the exception was caused by a general algorithm error, "General Error
:<Exception Description>" will be specified.aException
- Exception thrown during testpublic static junit.framework.Test suite()
protected void setUp()
setUp
in class junit.framework.TestCase
protected void tearDown()
tearDown
, which currently does nothing.tearDown
in class junit.framework.TestCase
public static EPPRegistryZone buildZoneInfo(EPPRegistryZoneName aZone, boolean aContactPolicy, boolean aDsDataInterface, boolean aHostObjModel)
EPPRegistryZone
instance given a zone name.aZone
- Zone name to create a populated EPPRegistryZone
instance
for.aContactPolicy
- Include the contact policy? If true
the contact policy
information will be included in the response; otherwise there
will be no contact policy information.aDsDataInterface
- Is the DNSSEC DS data interface supported? If true
the
DS data interface is supported; otherwise the Key data interface
is supported.aHostObjModel
- Is the host object model used in RFC 5731? If true
then
the host object model is used; otherwise the host attribute
model is used.EPPRegistryZone
instancepublic static EPPRegistryDomain buildDomain()
EPPRegistryDomain
instancepublic static EPPRegistryDomain buildDomain(boolean aDsDataInterface, boolean aHostObjModel)
aDsDataInterface
- Is the DNSSEC DS data interface supported? IF true
the
DS data interface is supported; otherwise the Key data interface
is supported.aHostObjModel
- Is the host object model used in RFC 5731? If true
then
the host object model is used; otherwise the host attribute
model is used.EPPRegistryDomain
instancepublic static EPPRegistryContact buildContact()
EPPRegistryContact
instancepublic static EPPRegistryHost buildHost(boolean aHostObjModel)
aHostObjModel
- Is the host object model used in RFC 5731? If true
then
the host object model is used; otherwise the host attribute
model is used.EPPRegistryHost
instance