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 theEPPContact
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 anEPPContactTst
with a logical name.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
contactCreateMinimal()
Unit test ofEPPContact.sendCreate
with relaxed validations that has includes the minimal set of attributes needed to pass relaxed validation.void
contactCreatePartial()
Unit test ofEPPContact.sendCreate
with relaxed validations that has some of the mandatory fields defined by the RFC set.void
contactCreateWithAllAttributes()
Unit test ofEPPContact.sendCreate
.void
contactInfo(java.lang.String aPrefix)
Unit test of usingEPPContact.sendInfo
that takes a prefix to use in setting the contact id.void
handleException(EPPCommandException aException)
Handle anEPPCommandException
, which can be either a server generated error or a general exception.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
).protected 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 withEPPContact
.protected void
tearDown()
JUNITtearDown
, which currently does nothing.void
testContact()
JUNIT test method to implement theEPPContactTst 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
-
testContact
public void testContact()
JUNIT test method to implement theEPPContactTst 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 usingEPPContact.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:
- 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. - 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. - 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
- Minimal - Will return the minimal amount in the info response that is
not RFC compliant. The
-
contactCreateMinimal
public void contactCreateMinimal()
Unit test ofEPPContact.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:
- contact id
- auth info
- postal info type
The following attributes that are required by RFC are not set:
- name
- street
- city
- country
-
contactCreatePartial
public void contactCreatePartial()
Unit test ofEPPContact.sendCreate
with relaxed validations that has some of the mandatory fields defined by the RFC set. The following attributes are set for the contact:
- contact id
- auth info
- postal info type
- address country
- e-mail address
The following attributes that are required by RFC are not set:
- name
- street
- city
-
contactCreateWithAllAttributes
public void contactCreateWithAllAttributes()
Unit test ofEPPContact.sendCreate
.
-
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 withEPPContact
.- Returns:
Test
to run
-
handleException
public void handleException(EPPCommandException 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
- Program arguments
-
-