Class EPPRegistryTst
- java.lang.Object
-
- junit.framework.Assert
-
- junit.framework.TestCase
-
- com.verisign.epp.interfaces.registry.v02.EPPRegistryTst
-
- All Implemented Interfaces:
junit.framework.Test
public class EPPRegistryTst extends junit.framework.TestCase
-
-
Constructor Summary
Constructors Constructor Description EPPRegistryTst(java.lang.String name)Allocates anEPPRegistryTstwith a logical name.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static EPPRegistryContactbuildContact()Build a populated contact object policy object to include in a zone.static EPPRegistryDomainbuildDomain()Build a populated domain object policy object to include in a zone with the DS Data Interface.static EPPRegistryDomainbuildDomain(boolean aDsDataInterface, boolean aHostObjModel)Build a populated domain object policy object to include in a zone.static EPPRegistryHostbuildHost(boolean aHostObjModel)Build a populated host object policy object to include in a zone.static EPPRegistryZonebuildZoneInfo(EPPRegistryZoneName aZone, boolean aContactPolicy, boolean aDsDataInterface, boolean aHostObjModel)Creates a populatedEPPRegistryZoneinstance given a zone name.voidhandleException(java.lang.Exception aException)Handle anEPPCommandException, which can be either a server generated error or a general exception.java.lang.StringmakeZoneName()Make a pseudo random zone name.voidregistryCheck(java.util.Map aZoneNames)Unit test ofEPPRegistry.sendCheck.voidregistryCreate(java.lang.String aZoneName, boolean aShouldSucceed)Unit test ofEPPRegistry.sendCreate.voidregistryDelete(java.lang.String aZoneName, boolean aShouldSucceed)Unit test ofEPPRegistry.sendDelete.voidregistryInfo(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 theaZoneNameparameter to a non-nullvalue, getting a summary of all zones by setting theaScopeparameter to a non-nullvalue, and getting the system information by setting theaSystemparameter to true.voidregistryUpdate(java.lang.String aZoneName, boolean aShouldSucceed)Unit test ofEPPRegistry.sendUpdate.protected voidsetUp()Setup the test by establishing an EPP session with the server.static junit.framework.Testsuite()protected voidtearDown()JUNITtearDown, which currently does nothing.voidtestRegistry()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.-
Methods inherited from class junit.framework.TestCase
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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, toString
-
-
-
-
Method Detail
-
testRegistry
public 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.
-
registryCheck
public void registryCheck(java.util.Map aZoneNames)
Unit test ofEPPRegistry.sendCheck.- Parameters:
aZoneNames- Zone names to check
-
registryCreate
public void registryCreate(java.lang.String aZoneName, boolean aShouldSucceed)Unit test ofEPPRegistry.sendCreate.- Parameters:
aZoneName- Name of zone to createaShouldSucceed- is the test expected to succeed?
-
registryDelete
public void registryDelete(java.lang.String aZoneName, boolean aShouldSucceed)Unit test ofEPPRegistry.sendDelete.- Parameters:
aZoneName- Name of zone to deleteaShouldSucceed- is the test expected to succeed?
-
registryUpdate
public void registryUpdate(java.lang.String aZoneName, boolean aShouldSucceed)Unit test ofEPPRegistry.sendUpdate.- Parameters:
aZoneName- Name of zone to updateaShouldSucceed- is the test expected to succeed?
-
registryInfo
public 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 theaZoneNameparameter to a non-nullvalue, getting a summary of all zones by setting theaScopeparameter to a non-nullvalue, and getting the system information by setting theaSystemparameter to true. There can be only one form used as a time.- Parameters:
aMode- One of the support info modes (EPPRegistryInfoCmd.Mode.name,EPPRegistryInfoCmd.Mode.all, orEPPRegistryInfoCmd.Mode.system)aZoneName- Used with the "name" info mode that represents the zone name to query. Set tonullwith theEPPRegistryInfoCmd.Mode.allorEPPRegistryInfoCmd.Mode.systemmodes.aScope- Used with the "all" info mode that represents the scope of the zones to query. Set tonullwith theEPPRegistryInfoCmd.Mode.nameorEPPRegistryInfoCmd.Mode.systemmodes.
-
makeZoneName
public java.lang.String makeZoneName()
Make a pseudo random zone name.- Returns:
- pseudo random zone name
-
handleException
public void handleException(java.lang.Exception aException)
Handle anEPPCommandException, 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.- Parameters:
aException- Exception thrown during test
-
suite
public static junit.framework.Test suite()
-
setUp
protected void setUp()
Setup the test by establishing an EPP session with the server.- Overrides:
setUpin classjunit.framework.TestCase
-
tearDown
protected void tearDown()
JUNITtearDown, which currently does nothing.- Overrides:
tearDownin classjunit.framework.TestCase
-
buildZoneInfo
public static EPPRegistryZone buildZoneInfo(EPPRegistryZoneName aZone, boolean aContactPolicy, boolean aDsDataInterface, boolean aHostObjModel)
Creates a populatedEPPRegistryZoneinstance given a zone name.- Parameters:
aZone- Zone name to create a populatedEPPRegistryZoneinstance for.aContactPolicy- Include the contact policy? Iftruethe 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? Iftruethe DS data interface is supported; otherwise the Key data interface is supported.aHostObjModel- Is the host object model used in RFC 5731? Iftruethen the host object model is used; otherwise the host attribute model is used.- Returns:
- Populated
EPPRegistryZoneinstance
-
buildDomain
public static EPPRegistryDomain buildDomain()
Build a populated domain object policy object to include in a zone with the DS Data Interface.- Returns:
- A populated
EPPRegistryDomaininstance
-
buildDomain
public static EPPRegistryDomain buildDomain(boolean aDsDataInterface, boolean aHostObjModel)
Build a populated domain object policy object to include in a zone.- Parameters:
aDsDataInterface- Is the DNSSEC DS data interface supported? IFtruethe DS data interface is supported; otherwise the Key data interface is supported.aHostObjModel- Is the host object model used in RFC 5731? Iftruethen the host object model is used; otherwise the host attribute model is used.- Returns:
- A populated
EPPRegistryDomaininstance
-
buildContact
public static EPPRegistryContact buildContact()
Build a populated contact object policy object to include in a zone.- Returns:
- A populated
EPPRegistryContactinstance
-
buildHost
public static EPPRegistryHost buildHost(boolean aHostObjModel)
Build a populated host object policy object to include in a zone.- Parameters:
aHostObjModel- Is the host object model used in RFC 5731? Iftruethen the host object model is used; otherwise the host attribute model is used.- Returns:
- A populated
EPPRegistryHostinstance
-
-