com.verisign.epp.codec.verificationcode
Class EPPVerificationCodeTst

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

public class EPPVerificationCodeTst
extends junit.framework.TestCase

Is a unit test of the com.verisign.epp.codec.verificationcode package.


Constructor Summary
EPPVerificationCodeTst(java.lang.String name)
          Creates a new EPPVerificationCodeTst object.
 
Method Summary
static java.security.cert.PKIXParameters loadPKIXParameters(java.lang.String aTrustStoreName)
          Loads the trust store file into the PKIXParameters 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 by loadPrivateKeyEntry(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()
          JUNIT setUp method.
static junit.framework.Test suite()
          JUNIT suite static method, which returns the tests associated with EPPVerificationCodeTst.
protected  void tearDown()
          JUNIT tearDown, which currently does nothing.
 void testDomainWithMultiVerificationCode()
          Unit test of extending the domain create command with multiple typed verification codes contained in the verification code extension.
 void testDomainWithVerificationCode()
          Unit test of extending the domain create command with a single untyped verification code contained in the verification code extension.
 void testEncodedSignedCode()
          Test different encoded signed codes that include:
Domain typed code Real-name typed code Negative test - Invalid vsp-id Negative test - Invalid code type
 void testInfo()
          Test of the info extension with the cases:
Empty info extension - Includes the default case of an empty extension element.
 void testInfoResponse()
          Test of the info response extension with the cases:
Status - Return just the notApplicable verification status Status and Profile - Return the verification status and the profile Status, Profile, and Set Codes from Sponsoring Client - Return the status, profile, and two verification codes from the sponsoring registrar.
 void testVerificationCode()
          Test the EPPVerificationCode class.
 
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

EPPVerificationCodeTst

public EPPVerificationCodeTst(java.lang.String name)
Creates a new EPPVerificationCodeTst object.

Parameters:
name - Test name
Method Detail

testVerificationCode

public void testVerificationCode()
Test the EPPVerificationCode class.


testDomainWithVerificationCode

public void testDomainWithVerificationCode()
Unit test of extending the domain create command with a single untyped verification code contained in the verification code extension.


testInfo

public void testInfo()
Test of the info extension with the cases:
  1. Empty info extension - Includes the default case of an empty extension element.
  2. Info extension with profile - Include the extension with the profile attribute set


testInfoResponse

public void testInfoResponse()
Test of the info response extension with the cases:
  1. Status - Return just the notApplicable verification status
  2. Status and Profile - Return the verification status and the profile
  3. Status, Profile, and Set Codes from Sponsoring Client - Return the status, profile, and two verification codes from the sponsoring registrar.
  4. Status, Profile, and Set Codes from Non-Sponsoring Client - Return the status, profile, and two verification codes from the non-sponsoring registrar.
  5. Status, Profile, and Missing Codes from Non-Sponsoring Client - Return the status, profile, and two missing codes from the non-sponsoring registrar.
  6. Status, Profile, Missing Codes, and Set Codes from Non-Sponsoring Client - Return the status, profile, and one missing code, and one set code from the non-sponsoring registrar.
  7. Status, Profile, and Set Codes from Sponsoring Client with Codes Set from Another Profile - Return the status, profile, and two verification codes from the sponsoring registrar, and include the set codes for the notApplicable profile.


testDomainWithMultiVerificationCode

public void testDomainWithMultiVerificationCode()
Unit test of extending the domain create command with multiple typed verification codes contained in the verification code extension.


testEncodedSignedCode

public void testEncodedSignedCode()
Test different encoded signed codes that include:
  1. Domain typed code
  2. Real-name typed code
  3. Negative test - Invalid vsp-id
  4. Negative test - Invalid code type


setUp

protected void setUp()
JUNIT setUp method.

Overrides:
setUp in class junit.framework.TestCase

tearDown

protected void tearDown()
JUNIT tearDown, which currently does nothing.

Overrides:
tearDown in class junit.framework.TestCase

suite

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

Returns:
Test suite

main

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

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 the PKIXParameters 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 by loadPrivateKeyEntry(String, String, String).

Parameters:
aKeyStoreName - Java Keystore containing the certificate
aPublicKeyAlias - Java Keystore alias of the trustedCertEntry containing the public key
Returns:
Loaded PublicKey instance
Throws:
java.lang.Exception - Error loading the public key


Copyright © VeriSign Inc. All Rights Reserved.