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 the `EPPDomain` class. The unit test will initialize a session with an EPP Server, will invoke `EPPDomain` 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 and Description
    `EPPLaunchTst(java.lang.String aName)` Allocates an `EPPLaunchTst` with a logical name.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `handleException(java.lang.Exception aException)` Handle an `EPPCommandException`, which can be either a server generated error or a general exception.
    `void` | `launchCheck()` Unit test of using using the `EPPLaunchCheck` Extension with `EPPDomain` info command with the following tests: Claims check with one domain name and implicitly setting the type.
    `void` | `launchCreateActiveSMD()` Unit test of using the `EPPLaunchCreate` Extension with `EPPDomain` create command for sunrise with the use of an active Signed Mark Data (SMD).
    `void` | `launchCreateCodeMark()` Unit test of using using the `EPPLaunchCreate` Extension with `EPPDomain` create command for sunrise with the use of codeMark's.
    `void` | `launchCreateGeneric()` Unit test of using using the `EPPLaunchCreate` Extension with `EPPDomain` create command using the Create Generic Form.
    `void` | `launchCreateNotice()` Unit test of using using the `EPPLaunchCreate` Extension with `EPPDomain` create command for CLAIMS and claims2 phases with the `EPPLaunchNotice`.
    `void` | `launchCreateSignedMark()` Unit test of using the `EPPLaunchCreate` Extension with `EPPDomain` create command for sunrise with the use of signedMark's.
    `void` | `launchDelete()` Unit test of using using the `EPPLaunchDelete` Extension with `EPPDomain` 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 the `EPPLaunchInfo` Extension with `EPPDomain` 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 the `EPPLaunchUpdate` Extension with `EPPDomain` 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 Server
    `protected void` | `setUp()` JUNIT `setUp` method, which sets the default client Id to "theRegistrar".
    `static junit.framework.Test` | `suite()` JUNIT `suite` static method, which returns the tests associated with `EPPLaunchTst`.
    `protected void` | `tearDown()` JUNIT `tearDown`, which currently does nothing.
    `void` | `testLaunchPhase()` JUNIT test method to implement the `EPPLaunchTst TestCase`.

    - ### Methods inherited from class junit.framework.TestCase

      `countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString`

    - ### Methods inherited from class junit.framework.Assert

      `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`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### EPPLaunchTst

          public EPPLaunchTst(java.lang.String aName)

      Allocates an `EPPLaunchTst` with a logical name. The constructor will initialize the base class `TestCase` with the logical name.
      Parameters:
        `aName` - Logical name of the test

  - ### Method Detail

    - #### testLaunchPhase

          public void testLaunchPhase()

      JUNIT test method to implement the `EPPLaunchTst TestCase`. Each sub-test will be invoked in order to satisfy testing the EPPDomain interface.

    - #### launchCheck

          public void launchCheck()

      Unit test of using using the `EPPLaunchCheck` Extension with `EPPDomain` info command with the following tests:
      1. Claims check with one domain name and implicitly setting the type.
      2. Claims check with two domain names and explicitly setting the type.
      3. Available check with two domain names for the custom "idn-release" launch phase.

    - #### launchInfo

          public void launchInfo()

      Unit test of using using the `EPPLaunchInfo` Extension with `EPPDomain` info command with the following tests:
      1. Info command for sunrise application "abc123"
      2. Info command for sunrise registration
      3. Info command for landrush application
      4. Info command for unsupported landrush registration
      5. Info command for unsupported phase "CLAIMS"

    - #### launchCreateCodeMark

          public void launchCreateCodeMark()

      Unit test of using using the `EPPLaunchCreate` Extension with `EPPDomain` create command for sunrise with the use of codeMark's. The following tests are executed:
      1. Create command for sunrise application with code
      2. Create command for sunrise application with list of codes
      3. Create command for sunrise application with mark
      4. Create command for sunrise application with list of marks
      5. Create command for sunrise application with code and mark
      6. Create command for sunrise application with list of codes and marks
      7. Create command for sunrise registration with list of codes and marks
      8. Create command for mix of sunrise and claims create model

    - #### launchCreateSignedMark

          public void launchCreateSignedMark()

      Unit test of using the `EPPLaunchCreate` Extension with `EPPDomain` create command for sunrise with the use of signedMark's. The following tests are executed:
      1. Create a sunrise application with a signed mark in XML
      2. Create a sunrise application with a signed mark in Base64
      3. Create a sunrise application with list of signed marks in Base64
      4. Create a sunrise registration with list of signed marks in Base64
      5. Create command for sunrise registration with revoked certificate

    - #### launchCreateActiveSMD

          public void launchCreateActiveSMD()

      Unit test of using the `EPPLaunchCreate` Extension with `EPPDomain` 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:
      1. Create a sunrise application APPPENDINGALLOCATION.TLD that transitions from "pendingValidation" to validated to "pendingAllocation". There will be two poll messages.
      2. 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.
      3. 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 the `EPPLaunchCreate` Extension with `EPPDomain` create command using the Create Generic Form. The following tests are executed:
      1. Create command for landrush with no type defined
      2. Create create command for a landrush application
      3. Create create command for a landrush registration

    - #### launchCreateNotice

          public void launchCreateNotice()

      Unit test of using using the `EPPLaunchCreate` Extension with `EPPDomain` create command for CLAIMS and claims2 phases with the `EPPLaunchNotice`. The following tests are executed:
      1. Create command for CLAIMS with notice information.
      2. Create command for CLAIMS with notice information and validatorID.
      3. Create command for CLAIMS without notice information.

    - #### launchUpdate

          public void launchUpdate()

      Unit test of using using the `EPPLaunchUpdate` Extension with `EPPDomain` update command with the following tests:
      1. Update command for sunrise application "abc123"
      2. Update command for landrush application "abc123"
      3. Update command for unsupported phase "CLAIMS"

    - #### launchDelete

          public void launchDelete()

      Unit test of using using the `EPPLaunchDelete` Extension with `EPPDomain` delete command with the following tests:
      1. Delete command for sunrise application "abc123"
      2. Delete command for landrush application "abc123"
      3. Delete command for unsupported phase "CLAIMS"

    - #### launchTMCHPendingSunrise

          public void launchTMCHPendingSunrise()

      Unit test for executing a TMCH pending sunrise flow that includes the following:
      1. Create a sunrise application with a signed mark in XML for application 1
      2. Create a sunrise application with a signed mark in Base64 for application 2
      3. Execute an info of the sunrise application 1 using the application id
      4. 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.
      5. Get the poll messages for the allocated / accepted application and the rejected application.
      6. Info both the accepted and rejected applications using the application id.
      7. Info the domain name of the allocated domain name without the application id.

    - #### setUp

          protected void setUp()

      JUNIT `setUp` method, which sets the default client Id to "theRegistrar".
      Overrides:
        `setUp` in class `junit.framework.TestCase`

    - #### tearDown

          protected void tearDown()

      JUNIT `tearDown`, which currently does nothing.
      Overrides:
        `tearDown` in class `junit.framework.TestCase`

    - #### suite

          public static junit.framework.Test suite()

      JUNIT `suite` static method, which returns the tests associated with `EPPLaunchTst`.
      Returns:
        Test to execute.

    - #### handleException

          public void handleException(java.lang.Exception aException)

      Handle an `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.
      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