Class EPPVerificationCodeTst
java.lang.Object
com.verisign.epp.codec.verificationcode.EPPVerificationCodeTst
Is a unit test of the com.verisign.epp.codec.verificationcode package.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PKIXParametersloadPKIXParameters(String aTrustStoreName) Loads the trust store file into thePKIXParametersused to verify the certificate chain The Java Trust Store is loaded with the trusted VSP certificates.static PublicKeyloadPublicKey(String aKeyStoreName, String aPublicKeyAlias) Loads the public key used to verify a digital signature signed with the associated private key, loaded byloadPrivateKeyEntry(String, String, String).static voidsetNumIterations(long aNumIterations) Sets the number of iterations to run per test.static voidsetup()JUNITsuitestatic method, which returns the tests associated withEPPVerificationCodeTst.voidUnit test of extending the domain create command with multiple typed verification codes contained in the verification code extension.voidUnit test of extending the domain create command with a single untyped verification code contained in the verification code extension.voidTest 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 typevoidtestInfo()Test of the info extension with the cases:
Empty info extension - Includes the default case of an empty extension element.voidTest 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.voidTest theEPPVerificationCodeclass.
-
Constructor Details
-
EPPVerificationCodeTst
public EPPVerificationCodeTst()
-
-
Method Details
-
testVerificationCode
public void testVerificationCode()Test theEPPVerificationCodeclass. -
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:
- Empty info extension - Includes the default case of an empty extension element.
- 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:
- 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.
-
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:
- 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
-
setup
public static void setup()JUNITsuitestatic method, which returns the tests associated withEPPVerificationCodeTst. -
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
Loads the trust store file into thePKIXParametersused to verify the certificate chain The Java Trust Store is loaded with the trusted VSP certificates.- Parameters:
aTrustStoreName- Trust store file name- Returns:
- Initialized
PKIXParametersinstance. - Throws:
Exception- Error initializing the PKIX parameters
-
loadPublicKey
public static PublicKey loadPublicKey(String aKeyStoreName, String aPublicKeyAlias) throws 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 thetrustedCertEntrycontaining the public key- Returns:
- Loaded
PublicKeyinstance - Throws:
Exception- Error loading the public key
-