Package com.verisign.epp.interfaces
Class EPPLaunchTst
- java.lang.Object
-
- junit.framework.Assert
-
- junit.framework.TestCase
-
- com.verisign.epp.interfaces.EPPLaunchTst
-
- All Implemented Interfaces:
junit.framework.Test
public class EPPLaunchTst extends junit.framework.TestCase
Is a unit test of the using the LaunchPhase Extension classes with theEPPDomain
class. The unit test will initialize a session with an EPP Server, will invokeEPPDomain
operations with LaunchPhase Extensions, and will end a session with an EPP Server. The configuration file used by the unit test defaults to epp.config, but can be changed by passing the file path as the first command line argument. The unit test can be run in multiple threads by setting the "threads" system property. For example, the unit test can be run in 2 threads with the configuration file ../../epp.config with the following command:
java com.verisign.epp.interfaces.EPPLaunchTst -Dthreads=2 ../../epp.config
The unit test is dependent on the use of JUNIT 3.5
-
-
Constructor Summary
Constructors Constructor Description EPPLaunchTst(java.lang.String aName)
Allocates anEPPLaunchTst
with a logical name.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
handleException(java.lang.Exception aException)
Handle anEPPCommandException
, which can be either a server generated error or a general exception.void
launchCheck()
Unit test of using using theEPPLaunchCheck
Extension withEPPDomain
info command with the following tests:
Claims check with one domain name and implicitly setting the type.void
launchCreateActiveSMD()
Unit test of using theEPPLaunchCreate
Extension withEPPDomain
create command for sunrise with the use of an active Signed Mark Data (SMD).void
launchCreateCodeMark()
Unit test of using using theEPPLaunchCreate
Extension withEPPDomain
create command for sunrise with the use of codeMark's.void
launchCreateGeneric()
Unit test of using using theEPPLaunchCreate
Extension withEPPDomain
create command using the Create Generic Form.void
launchCreateNotice()
Unit test of using using theEPPLaunchCreate
Extension withEPPDomain
create command for CLAIMS and claims2 phases with theEPPLaunchNotice
.void
launchCreateSignedMark()
Unit test of using theEPPLaunchCreate
Extension withEPPDomain
create command for sunrise with the use of signedMark's.void
launchDelete()
Unit test of using using theEPPLaunchDelete
Extension withEPPDomain
delete command with the following tests:
Delete command for sunrise application "abc123" Delete command for landrush application "abc123" Delete command for unsupported phase "CLAIMS"void
launchInfo()
Unit test of using using theEPPLaunchInfo
Extension withEPPDomain
info command with the following tests:
Info command for sunrise application "abc123" Info command for sunrise registration Info command for landrush application Info command for unsupported landrush registration Info command for unsupported phase "CLAIMS"void
launchPollMessaging()
Unit test of the poll messaging for intermediate and terminal status transitions The following tests are executed:
Create a sunrise application APPPENDINGALLOCATION.TLD that transitions from "pendingValidation" to validated to "pendingAllocation".void
launchTMCHPendingSunrise()
Unit test for executing a TMCH pending sunrise flow that includes the following:
Create a sunrise application with a signed mark in XML for application 1 Create a sunrise application with a signed mark in Base64 for application 2 Execute an info of the sunrise application 1 using the application id Update the sunrise application that is chosen for allocation (application 1), that allocates application 1 and rejects application 2.void
launchUpdate()
Unit test of using using theEPPLaunchUpdate
Extension withEPPDomain
update command with the following tests:
Update command for sunrise application "abc123" Update command for landrush application "abc123" Update command for unsupported phase "CLAIMS"static void
main(java.lang.String[] args)
Unit test main, which accepts the following system property options:
iterations Number of unit test iterations to run validate Turn XML validation on (true
) or off (false
).java.lang.String
makeDomainName()
This method tries to generate a unique String as Domain Name and Name Serverprotected void
setUp()
JUNITsetUp
method, which sets the default client Id to "theRegistrar".static junit.framework.Test
suite()
JUNITsuite
static method, which returns the tests associated withEPPLaunchTst
.protected void
tearDown()
JUNITtearDown
, which currently does nothing.void
testLaunchPhase()
JUNIT test method to implement theEPPLaunchTst TestCase
.-
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
-
testLaunchPhase
public void testLaunchPhase()
JUNIT test method to implement theEPPLaunchTst TestCase
. Each sub-test will be invoked in order to satisfy testing the EPPDomain interface.
-
launchCheck
public void launchCheck()
Unit test of using using theEPPLaunchCheck
Extension withEPPDomain
info command with the following tests:
- Claims check with one domain name and implicitly setting the type.
- Claims check with two domain names and explicitly setting the type.
- Available check with two domain names for the custom "idn-release" launch phase.
-
launchInfo
public void launchInfo()
Unit test of using using theEPPLaunchInfo
Extension withEPPDomain
info command with the following tests:
- Info command for sunrise application "abc123"
- Info command for sunrise registration
- Info command for landrush application
- Info command for unsupported landrush registration
- Info command for unsupported phase "CLAIMS"
-
launchCreateCodeMark
public void launchCreateCodeMark()
Unit test of using using theEPPLaunchCreate
Extension withEPPDomain
create command for sunrise with the use of codeMark's. The following tests are executed:
- Create command for sunrise application with code
- Create command for sunrise application with list of codes
- Create command for sunrise application with mark
- Create command for sunrise application with list of marks
- Create command for sunrise application with code and mark
- Create command for sunrise application with list of codes and marks
- Create command for sunrise registration with list of codes and marks
- Create command for mix of sunrise and claims create model
-
launchCreateSignedMark
public void launchCreateSignedMark()
Unit test of using theEPPLaunchCreate
Extension withEPPDomain
create command for sunrise with the use of signedMark's. The following tests are executed:
- Create a sunrise application with a signed mark in XML
- Create a sunrise application with a signed mark in Base64
- Create a sunrise application with list of signed marks in Base64
- Create a sunrise registration with list of signed marks in Base64
- Create command for sunrise registration with revoked certificate
-
launchCreateActiveSMD
public void launchCreateActiveSMD()
Unit test of using theEPPLaunchCreate
Extension withEPPDomain
create command for sunrise with the use of an active Signed Mark Data (SMD).
-
launchPollMessaging
public void launchPollMessaging()
Unit test of the poll messaging for intermediate and terminal status transitions The following tests are executed:
- Create a sunrise application APPPENDINGALLOCATION.TLD that transitions from "pendingValidation" to validated to "pendingAllocation". There will be two poll messages.
- Create a sunrise application APPREJECTEDINVALID.TLD that transitions from "pendingValidation" to "invalid" to "rejected". There will be one standard poll message and one pending action poll message.
- Create a sunrise application APPALLOCATEDALLSTATES.TLD that transitions from "pendingValidation" to "validated" to "pendingAllocation" to "allocated". There will be two poll message from the transitions from "pendingAllocation" to "validated" and from "validated" to "pendingAllocation". There will be one pending action poll message from the transition from "pendingAllocation" to "allocated".
-
launchCreateGeneric
public void launchCreateGeneric()
Unit test of using using theEPPLaunchCreate
Extension withEPPDomain
create command using the Create Generic Form. The following tests are executed:
- Create command for landrush with no type defined
- Create create command for a landrush application
- Create create command for a landrush registration
-
launchCreateNotice
public void launchCreateNotice()
Unit test of using using theEPPLaunchCreate
Extension withEPPDomain
create command for CLAIMS and claims2 phases with theEPPLaunchNotice
. The following tests are executed:
- Create command for CLAIMS with notice information.
- Create command for CLAIMS with notice information and validatorID.
- Create command for CLAIMS without notice information.
-
launchUpdate
public void launchUpdate()
Unit test of using using theEPPLaunchUpdate
Extension withEPPDomain
update command with the following tests:
- Update command for sunrise application "abc123"
- Update command for landrush application "abc123"
- Update command for unsupported phase "CLAIMS"
-
launchDelete
public void launchDelete()
Unit test of using using theEPPLaunchDelete
Extension withEPPDomain
delete command with the following tests:
- Delete command for sunrise application "abc123"
- Delete command for landrush application "abc123"
- Delete command for unsupported phase "CLAIMS"
-
launchTMCHPendingSunrise
public void launchTMCHPendingSunrise()
Unit test for executing a TMCH pending sunrise flow that includes the following:
- Create a sunrise application with a signed mark in XML for application 1
- Create a sunrise application with a signed mark in Base64 for application 2
- Execute an info of the sunrise application 1 using the application id
- Update the sunrise application that is chosen for allocation (application 1), that allocates application 1 and rejects application 2. The server keys off of the domain names on the domain update to allocate and insert the appropriate poll messages. This is obviously not expected of a real server.
- Get the poll messages for the allocated / accepted application and the rejected application.
- Info both the accepted and rejected applications using the application id.
- Info the domain name of the allocated domain name without the application id.
-
setUp
protected void setUp()
JUNITsetUp
method, which sets the default client Id to "theRegistrar".- Overrides:
setUp
in classjunit.framework.TestCase
-
tearDown
protected void tearDown()
JUNITtearDown
, which currently does nothing.- Overrides:
tearDown
in classjunit.framework.TestCase
-
suite
public static junit.framework.Test suite()
JUNITsuite
static method, which returns the tests associated withEPPLaunchTst
.- Returns:
- Test to execute.
-
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
-
main
public static void main(java.lang.String[] args)
Unit test main, which accepts the following system property options:
- iterations Number of unit test iterations to run
- validate Turn XML validation on (
true
) or off (false
). If validate is not specified, validation will be off.
- Parameters:
args
- Command line arguments
-
makeDomainName
public java.lang.String makeDomainName()
This method tries to generate a unique String as Domain Name and Name Server- Returns:
- Random domain name
-
-