com.verisign.epp.codec.gen
Class EPPCodecTst

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by com.verisign.epp.codec.gen.EPPCodecTst
All Implemented Interfaces:
junit.framework.Test

public class EPPCodecTst
extends junit.framework.TestCase

Is a unit test of the com.verisign.epp.codec.gen package. The unit test will execute, gather statistics, and output the results of a test of each com.verisign.epp.codec.gen package concrete EPPMessage's and their expected EPPResponse. The unit test is dependent on the use of JUNIT 3.5

The test EPPResponse is duplicated for EPPMessage that do not contain a specialized EPPResponse to provide an example of a full EPPMessage transaction. All of the com.verisign.epp.codec.gen package EPPMessage classes are associated with EPPResponse.

Version:
$Revision: 1.8 $
Author:
$Author: jim $

Constructor Summary
EPPCodecTst(java.lang.String aName)
          Allocates an EPPCodecTst with a logical name.
 
Method Summary
static void initEnvironment()
          Initialize the SDK environment based on the system properties:

validate - true or false value indicating if XML schema validation is enabled.
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).
static void printEnd(java.lang.String aTest)
          Print the end of a test with the Thread name if the current thread is a TestThread.
static void printStart(java.lang.String aTest)
          Print the start of a test with the Thread name if the current thread is a TestThread.
static void setNumIterations(long aNumIterations)
          Sets the number of iterations to run per test.
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 EPPCodecTst.
protected  void tearDown()
          JUNIT tearDown, which currently does nothing.
 void testCommandGetExtensionFailOnDuplicate()
          Unit test for using EPPCommand.getExtension(Class, boolean).
static EPPEncodeDecodeStats testEncodeDecode(EPPMessage aMessage)
          Reusable unit test algorithm, which does the following:

encodes the EPPMessage in XML decodes the EPPMessage from XML Serializes EPPMessage using Java Serialization De-serializes EPPMessage using Java Serialization Gathers unit test statistics and output them to standard out
 void testGreeting()
          Unit test of EPPGreeting.
 void testHello()
          Unit test of EPPHello.
 void testLogin()
          Unit test of EPPLoginCmd.
 void testLogout()
          Unit test of EPPLogoutCmd.
 void testPoll()
          Unit test of EPPPollCmd.
 void testResponse()
          Unit test of EPPResponse.
 void testResponseGetExtensionFailOnDuplicate()
          Unit test for using EPPResponse.getExtension(Class, boolean).
 void testTimeInstantFormat()
          Test the encoding and decoding of the timeInstantFormat supported by the EPPUtil.encodeTimeInstant(Date) and EPPUtil.decodeTimeInstant(String).
 
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

EPPCodecTst

public EPPCodecTst(java.lang.String aName)
Allocates an EPPCodecTst 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

testGreeting

public void testGreeting()
Unit test of EPPGreeting. There is no response associated with EPPGreeting other than a EPPLoginCmd which is testing in testLogin.

This test will be invoked by JUNIT, since it is prefixed with "test" and is a public method.


testLogin

public void testLogin()
Unit test of EPPLoginCmd. The response to EPPLoginCmd is EPPResponse.
This test will be invoked by JUNIT, since it is prefixed with "test" and is a public method.


testLogout

public void testLogout()
Unit test of EPPLogoutCmd. The response to EPPLogoutCmd is EPPResponse.
This test will be invoked by JUNIT, since it is prefixed with "test" and is a public method.


testResponse

public void testResponse()
Unit test of EPPResponse. This will test EPPResponse with various attribute values.
This test will be invoked by JUNIT, since it is prefixed with "test" and is a public method.


testCommandGetExtensionFailOnDuplicate

public void testCommandGetExtensionFailOnDuplicate()
Unit test for using EPPCommand.getExtension(Class, boolean).


testResponseGetExtensionFailOnDuplicate

public void testResponseGetExtensionFailOnDuplicate()
Unit test for using EPPResponse.getExtension(Class, boolean).


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

initEnvironment

public static void initEnvironment()
Initialize the SDK environment based on the system properties:


Both the Environment class and the logging will be initialized.


suite

public static junit.framework.Test suite()
JUNIT suite static method, which returns the tests associated with EPPCodecTst.

Returns:
DOCUMENT ME!

main

public static void main(java.lang.String[] args)
Unit test main, which accepts the following system property options:

Parameters:
args - DOCUMENT ME!

printStart

public static void printStart(java.lang.String aTest)
Print the start of a test with the Thread name if the current thread is a TestThread.

Parameters:
aTest - name for the test

printEnd

public static void printEnd(java.lang.String aTest)
Print the end of a test with the Thread name if the current thread is a TestThread.

Parameters:
aTest - name for the test

testEncodeDecode

public static EPPEncodeDecodeStats testEncodeDecode(EPPMessage aMessage)
Reusable unit test algorithm, which does the following:

Parameters:
aMessage - EPP Message to test encoding and decoding
Returns:
DOCUMENT ME!

setNumIterations

public static void setNumIterations(long aNumIterations)
Sets the number of iterations to run per test.

Parameters:
aNumIterations - number of iterations to run per test

testHello

public void testHello()
Unit test of EPPHello. The response to EPPHello is EPPResponse.
This test will be invoked by JUNIT, since it is prefixed with "test" and is a public method.


testPoll

public void testPoll()
Unit test of EPPPollCmd. The response to EPPPollCmd is EPPResponse.
This test will be invoked by JUNIT, since it is prefixed with "test" and is a public method.


testTimeInstantFormat

public void testTimeInstantFormat()
Test the encoding and decoding of the timeInstantFormat supported by the EPPUtil.encodeTimeInstant(Date) and EPPUtil.decodeTimeInstant(String).



Copyright © VeriSign Inc. All Rights Reserved.