Class EPPLaunchPolicyRegistryTst
java.lang.Object
junit.framework.Assert
junit.framework.TestCase
com.verisign.epp.interfaces.launchpolicy.v01.EPPLaunchPolicyRegistryTst
- All Implemented Interfaces:
junit.framework.Test
public class EPPLaunchPolicyRegistryTst
extends junit.framework.TestCase
-
Constructor Summary
ConstructorsConstructorDescriptionAllocates anEPPLaunchPolicyRegistryTstwith a logical name. -
Method Summary
Modifier and TypeMethodDescriptionstatic EPPLaunchPolicyZoneBuild a populatedEPPLaunchPolicyZoneinstance that can be included in one of the Launch Policy Extensions.voidhandleException(Exception aException) Handle anEPPCommandException, which can be either a server generated error or a general exception.Make a pseudo random zone name.voidregistryCheck(Map aZoneNames) Unit test ofEPPRegistry.sendCheck.voidregistryCreate(String aZoneName, boolean aShouldSucceed) Unit test ofEPPRegistry.sendCreate.voidregistryDelete(String aZoneName, boolean aShouldSucceed) Unit test ofEPPRegistry.sendDelete.voidregistryInfo(EPPRegistryInfoCmd.Mode aMode, 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(String aZoneName, boolean aShouldSucceed) Unit test ofEPPRegistry.sendUpdate.protected voidsetUp()static junit.framework.Testsuite()protected voidtearDown()JUNITtearDown, which currently does nothing.voidTest 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
-
Constructor Details
-
EPPLaunchPolicyRegistryTst
Allocates anEPPLaunchPolicyRegistryTstwith a logical name. The constructor will initialize the base classTestCasewith the logical name.- Parameters:
name- Logical name of the test
-
-
Method Details
-
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
Unit test ofEPPRegistry.sendCheck.- Parameters:
aZoneNames- Names of the zones to check
-
registryCreate
Unit test ofEPPRegistry.sendCreate.- Parameters:
aZoneName- Zone to createaShouldSucceed-trueif the zone create should succeed;falseotherwise.
-
registryDelete
Unit test ofEPPRegistry.sendDelete.- Parameters:
aZoneName- Zone to deleteaShouldSucceed-trueif the zone delete should succeed;falseotherwise.
-
registryUpdate
Unit test ofEPPRegistry.sendUpdate.- Parameters:
aZoneName- Zone to updateaShouldSucceed-trueif the zone update should succeed;falseotherwise.
-
registryInfo
public void registryInfo(EPPRegistryInfoCmd.Mode aMode, 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
Make a pseudo random zone name.- Returns:
- pseudo random zone name
-
handleException
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()- Overrides:
setUpin classjunit.framework.TestCase
-
tearDown
protected void tearDown()JUNITtearDown, which currently does nothing.- Overrides:
tearDownin classjunit.framework.TestCase
-
buildLaunchPolicyZone
Build a populatedEPPLaunchPolicyZoneinstance that can be included in one of the Launch Policy Extensions. The populated attributes are based on the sample included in draft-gould-regext-launch-policy. The following phases are added to the populatedEPPLaunchPolicyZoneinstance:
- Sunrise
- Claims for Limited Registration Period #1 (LRP1)
- Claims for Landrush
- Claims (Open)
- Custom for Limited Registration Period #2 (LRP2)
- Open
- Returns:
- Populated
EPPLaunchPolicyZonebased on the sample included in draft-gould-regext-launch-policy.
-