Package com.verisign.epp.codec.nv
Class EPPNameVerificationTst
- java.lang.Object
-
- junit.framework.Assert
-
- junit.framework.TestCase
-
- com.verisign.epp.codec.nv.EPPNameVerificationTst
-
- All Implemented Interfaces:
junit.framework.Test
public class EPPNameVerificationTst extends junit.framework.TestCase
Is a unit test of the com.verisign.epp.codec.idntable package.
-
-
Constructor Summary
Constructors Constructor Description EPPNameVerificationTst(java.lang.String name)
Creates a new EPPNameVerificationTst object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.security.cert.PKIXParameters
loadPKIXParameters(java.lang.String aTrustStoreName)
Loads the trust store file into thePKIXParameters
used to verify the certificate chain The Java Trust Store is loaded with the trusted VSP certificates.static java.security.PublicKey
loadPublicKey(java.lang.String aKeyStoreName, java.lang.String aPublicKeyAlias)
Loads the public key used to verify a digital signature signed with the associated private key, loaded byloadPrivateKeyEntry(String, String, String)
.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
setNumIterations(long aNumIterations)
Sets the number of iterations to run per test.protected void
setUp()
JUNITsetUp
method, which sets the default client Id to "theRegistrar" and initializes theEPPNameVerificationMapFactory
with theEPPCodec
.static junit.framework.Test
suite()
JUNITsuite
static method, which returns the tests associated withEPPNameVerificationTst
.protected void
tearDown()
JUNITtearDown
, which currently does nothing.void
testCheckCommand()
Unit test of the Check Command by sending a check command with three domain labels.void
testCheckResponse()
Unit test of the Check Response by returning the result of checking three domain labels.void
testCreateCommand()
Unit test of the Create Command, with the following tests: Create Domain Name Verification (DNV) object Create reserved Domain Name Verification (DNV) object Create Real Name Verification (RNV) object for person Create Real Name Verification (RNV) object for orgvoid
testCreateResponse()
Unit test of the Create Response, with the following tests: Success create response with a signed code Failed create response Pending create responsevoid
testInfoCommand()
Unit test of the Info Command, with the following tests: Info command for signed code. Info command for input data. Info command for signed code with authorization info.void
testInfoResponse()
Unit test of the Info Response, with the following tests: Info response for DNV signed code Info response for DNV input Info response for RNV person input Info response for RNV org inputvoid
testPaPollResponse()
Unit test of the pending action poll message.void
testUpdateCommand()
Unit test of the Update Command by sending an update command to change the authorization information.-
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
-
testCheckCommand
public void testCheckCommand()
Unit test of the Check Command by sending a check command with three domain labels.
-
testCheckResponse
public void testCheckResponse()
Unit test of the Check Response by returning the result of checking three domain labels.
-
testInfoCommand
public void testInfoCommand()
Unit test of the Info Command, with the following tests:- Info command for signed code.
- Info command for input data.
- Info command for signed code with authorization info.
-
testInfoResponse
public void testInfoResponse()
Unit test of the Info Response, with the following tests:- Info response for DNV signed code
- Info response for DNV input
- Info response for RNV person input
- Info response for RNV org input
-
testCreateCommand
public void testCreateCommand()
Unit test of the Create Command, with the following tests:- Create Domain Name Verification (DNV) object
- Create reserved Domain Name Verification (DNV) object
- Create Real Name Verification (RNV) object for person
- Create Real Name Verification (RNV) object for org
-
testCreateResponse
public void testCreateResponse()
Unit test of the Create Response, with the following tests:- Success create response with a signed code
- Failed create response
- Pending create response
-
testUpdateCommand
public void testUpdateCommand()
Unit test of the Update Command by sending an update command to change the authorization information.
-
testPaPollResponse
public void testPaPollResponse()
Unit test of the pending action poll message.
-
setUp
protected void setUp()
JUNITsetUp
method, which sets the default client Id to "theRegistrar" and initializes theEPPNameVerificationMapFactory
with theEPPCodec
.- 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 withEPPNameVerificationTst
.- Returns:
- Tests to run
-
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
-
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
-
loadPKIXParameters
public static java.security.cert.PKIXParameters loadPKIXParameters(java.lang.String aTrustStoreName) throws java.lang.Exception
Loads the trust store file into thePKIXParameters
used to verify the certificate chain The Java Trust Store is loaded with the trusted VSP certificates.- Parameters:
aTrustStoreName
- Trust store file name- Returns:
- Initialized
PKIXParameters
instance. - Throws:
java.lang.Exception
- Error initializing the PKIX parameters
-
loadPublicKey
public static java.security.PublicKey loadPublicKey(java.lang.String aKeyStoreName, java.lang.String aPublicKeyAlias) throws java.lang.Exception
Loads the public key used to verify a digital signature signed with the associated private key, loaded byloadPrivateKeyEntry(String, String, String)
.- Parameters:
aKeyStoreName
- Java Keystore containing the certificateaPublicKeyAlias
- Java Keystore alias of thetrustedCertEntry
containing the public key- Returns:
- Loaded
PublicKey
instance - Throws:
java.lang.Exception
- Error loading the public key
-
-