Package com.verisign.epp.interfaces

## Class EPPContactRelaxedValidationTst

- java.lang.Object
- - junit.framework.Assert
  - - junit.framework.TestCase
    - - com.verisign.epp.interfaces.EPPContactRelaxedValidationTst

- All Implemented Interfaces:
    `junit.framework.Test`

      public class EPPContactRelaxedValidationTst
      extends junit.framework.TestCase

  Is a unit test of the `EPPContact` class when relaxed validation is enabled when the EPP.Contact.RelaxedValidation property is set to "true". Only tests associated with relaxed validation are executed. If the EPP.Contact.RelaxedValidation property is not set to "true" a skipped message is written to standard out and the test will exit successfully without executing any of the tests.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `EPPContactRelaxedValidationTst​(java.lang.String name)` | Allocates an `EPPContactTst` with a logical name.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `contactCreateMinimal()` | Unit test of `EPPContact.sendCreate` with relaxed validations that has includes the minimal set of attributes needed to pass relaxed validation.
    `void` | `contactCreatePartial()` | Unit test of `EPPContact.sendCreate` with relaxed validations that has some of the mandatory fields defined by the RFC set.
    `void` | `contactCreateWithAllAttributes()` | Unit test of `EPPContact.sendCreate`.
    `void` | `contactInfo​(java.lang.String aPrefix)` | Unit test of using `EPPContact.sendInfo` that takes a prefix to use in setting the contact id.
    `void` | `handleException​(EPPCommandException aException)` | Handle an `EPPCommandException`, which can be either a server generated error or a general exception.
    `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 `EPPContact`.
    `protected void` | `tearDown()` | JUNIT `tearDown`, which currently does nothing.
    `void` | `testContact()` | JUNIT test method to implement the `EPPContactTst 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`

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

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

- - ### Constructor Detail

    - #### EPPContactRelaxedValidationTst

          public EPPContactRelaxedValidationTst​(java.lang.String name)

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

  - ### Method Detail

    - #### testContact

          public void testContact()

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

    - #### contactInfo

          public void contactInfo​(java.lang.String aPrefix)

      Unit test of using `EPPContact.sendInfo` that takes a prefix to use in setting the contact id. The contact info command is sent and the contact info response is printed to standard out. When executing the info command against the EPP SDK Stub Server, the following prefixes are supported:
      1. Minimal - Will return the minimal amount in the info response that is not RFC compliant. The `EPP.Contact.RelaxedValidation` property must be set to true for the response to pass XML schema validation.
      2. Partial - Will return partial information in the info response that is not RFC compliant. The `EPP.Contact.RelaxedValidation` property must be set to true for the response to pass XML schema validation.
      3. Anything else (e.g. Default) - Will return the default information in the info response that is RFC compliant.
      Parameters:
        `aPrefix` - Prefix to use in generating the contact identifier

    - #### contactCreateMinimal

          public void contactCreateMinimal()

      Unit test of `EPPContact.sendCreate` with relaxed validations that has includes the minimal set of attributes needed to pass relaxed validation. The following attributes are set for the contact:
      1. contact id
      2. auth info
      3. postal info type
      The following attributes that are required by RFC are not set:
      1. name
      2. street
      3. city
      4. country
      5. e-mail

    - #### contactCreatePartial

          public void contactCreatePartial()

      Unit test of `EPPContact.sendCreate` with relaxed validations that has some of the mandatory fields defined by the RFC set. The following attributes are set for the contact:
      1. contact id
      2. auth info
      3. postal info type
      4. address country
      5. e-mail address
      The following attributes that are required by RFC are not set:
      1. name
      2. street
      3. city

    - #### contactCreateWithAllAttributes

          public void contactCreateWithAllAttributes()

      Unit test of `EPPContact.sendCreate`.

    - #### 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 `EPPContact`.
      Returns:
        `Test` to run

    - #### handleException

          public void handleException​(EPPCommandException 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