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.TestCaseIs a unit test of theEPPContactclass 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 anEPPContactTstwith a logical name.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcontactCreateMinimal()Unit test ofEPPContact.sendCreatewith relaxed validations that has includes the minimal set of attributes needed to pass relaxed validation.voidcontactCreatePartial()Unit test ofEPPContact.sendCreatewith relaxed validations that has some of the mandatory fields defined by the RFC set.voidcontactCreateWithAllAttributes()Unit test ofEPPContact.sendCreate.voidcontactInfo(java.lang.String aPrefix)Unit test of usingEPPContact.sendInfothat takes a prefix to use in setting the contact id.voidhandleException(EPPCommandException aException)Handle anEPPCommandException, which can be either a server generated error or a general exception.static voidmain(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 voidsetUp()JUNITsetUpmethod, which sets the default client Id to "theRegistrar".static junit.framework.Testsuite()JUNITsuitestatic method, which returns the tests associated withEPPContact.protected voidtearDown()JUNITtearDown, which currently does nothing.voidtestContact()JUNIT test method to implement theEPPContactTst 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
-
-
-
-
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.sendInfothat 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.RelaxedValidationproperty 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.RelaxedValidationproperty 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.sendCreatewith 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.sendCreatewith 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()
JUNITsetUpmethod, which sets the default client Id to "theRegistrar".- Overrides:
setUpin classjunit.framework.TestCase
-
tearDown
protected void tearDown()
JUNITtearDown, which currently does nothing.- Overrides:
tearDownin classjunit.framework.TestCase
-
suite
public static junit.framework.Test suite()
JUNITsuitestatic method, which returns the tests associated withEPPContact.- Returns:
Testto 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
-
-