public class EPPVerificationCodeTst
extends junit.framework.TestCase
Constructor and Description |
---|
EPPVerificationCodeTst(java.lang.String name)
Creates a new EPPVerificationCodeTst object.
|
Modifier and Type | Method and Description |
---|---|
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 Test encoding and decoding the Base64 encoded signed code value (no wrapper <verificationCode:code> XML element). 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. Status, Profile, and Set Codes from Non-Sponsoring Client - Return the status, profile, and two verification codes from the non-sponsoring registrar. Status, Profile, and Missing Codes from Non-Sponsoring Client - Return the status, profile, and two missing codes from the non-sponsoring registrar. 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. 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. |
void |
testVerificationCode()
Test the
EPPVerificationCode class. |
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 EPPVerificationCodeTst(java.lang.String name)
name
- Test namepublic void testVerificationCode()
EPPVerificationCode
class.public void testDomainWithVerificationCode()
public void testInfo()
public void testInfoResponse()
public void testDomainWithMultiVerificationCode()
public void testEncodedSignedCode()
protected void setUp()
setUp
method.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 EPPVerificationCodeTst
.public static void main(java.lang.String[] args)
true
) or off (
false
). If validate is not specified, validation will be
off.args
- Program argumentspublic static void setNumIterations(long aNumIterations)
aNumIterations
- number of iterations to run per testpublic static java.security.cert.PKIXParameters loadPKIXParameters(java.lang.String aTrustStoreName) throws java.lang.Exception
PKIXParameters
used to
verify the certificate chain The Java Trust Store is loaded with the
trusted VSP certificates.aTrustStoreName
- Trust store file namePKIXParameters
instance.java.lang.Exception
- Error initializing the PKIX parameterspublic static java.security.PublicKey loadPublicKey(java.lang.String aKeyStoreName, java.lang.String aPublicKeyAlias) throws java.lang.Exception
loadPrivateKeyEntry(String, String, String)
.aKeyStoreName
- Java Keystore containing the certificateaPublicKeyAlias
- Java Keystore alias of the trustedCertEntry
containing the public keyPublicKey
instancejava.lang.Exception
- Error loading the public key