public class EPPContactRelaxedValidationTst
extends junit.framework.TestCase
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 and Description |
---|
EPPContactRelaxedValidationTst(java.lang.String name)
Allocates an
EPPContactTst with a logical name. |
Modifier and Type | Method and 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. |
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()
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 . |
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
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
public EPPContactRelaxedValidationTst(java.lang.String name)
EPPContactTst
with a logical name. The
constructor will initialize the base class TestCase
with the
logical name.name
- Logical name of the testpublic void testContact()
EPPContactTst TestCase
.
Each sub-test will be invoked in order to satisfy testing the EPPContact
interface.public void contactInfo(java.lang.String aPrefix)
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:EPP.Contact.RelaxedValidation
property
must be set to true for the response to pass XML schema validation.
EPP.Contact.RelaxedValidation
property
must be set to true for the response to pass XML schema validation.
aPrefix
- Prefix to use in generating the contact identifierpublic void contactCreateMinimal()
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:public void contactCreatePartial()
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:public void contactCreateWithAllAttributes()
EPPContact.sendCreate
.protected void setUp()
setUp
method, which sets the default client Id to
"theRegistrar".setUp
in class junit.framework.TestCase
protected void tearDown()
tearDown
, which currently does nothing.tearDown
in class junit.framework.TestCase
public static junit.framework.Test suite()
suite
static method, which returns the tests associated
with EPPContact
.Test
to runpublic void handleException(EPPCommandException aException)
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.aException
- Exception thrown during testpublic static void main(java.lang.String[] args)
true
) or off (
false
). If validate is not specified, validation will be off.
args
- Program arguments