Package com.verisign.epp.codec.launch
Class EPPLaunchTst
- java.lang.Object
-
- junit.framework.Assert
-
- junit.framework.TestCase
-
- com.verisign.epp.codec.launch.EPPLaunchTst
-
- All Implemented Interfaces:
junit.framework.Test
public class EPPLaunchTst extends junit.framework.TestCaseIs a unit test of the com.verisign.epp.codec.launch package. The unit test will execute, gather statistics, and output the results of a test of each com.verisign.epp.codec.launch package.
-
-
Constructor Summary
Constructors Constructor Description EPPLaunchTst(java.lang.String name)Creates a new EPPLaunchTst object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.security.cert.PKIXParametersloadPKIXParameters(java.lang.String aTrustStoreName, java.util.List<java.lang.String> aCrls)Loads the trust store file and the Certificate Revocation List (CRL) file into thePKIXParametersused to verify the certificate chain and verify the certificate against the CRL.static java.security.PublicKeyloadPublicKey(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 voidmain(java.lang.String[] args)Main method for running tests using stand alone program.static voidsetNumIterations(long aNumIterations)Sets the number of iterations to run per test.protected voidsetUp()JUNITsetUpmethod, which sets the default client Id to "theRegistrar" and initializes theEPPDomainMapFactorywith theEPPCodec.static junit.framework.Testsuite()JUNITsuitestatic method, which returns the tests associated withEPPLaunchTst.protected voidtearDown()JUNITtearDown, which currently does nothing.voidtestLaunchAvailabilityCheckForm()Tests thetestLaunchAvailabilityCheckFormcheck command extension.voidtestLaunchClaimsCheckForm()Tests thetestLaunchClaimsCheckFormcheck command extension.voidtestLaunchCreateCodeMark()Tests theEPPLaunchCreatecreate command extension with use of the code and mark in Sunrise Create Form.voidtestLaunchCreateGeneric()Tests theEPPLaunchCreatecreate command extension with use of the Generic Create Form:
Test create command for landrush with no type defined Test create command for a landrush application Test create command for a landrush registrationvoidtestLaunchCreateNotice()Tests theEPPLaunchCreatecreate command extension with use of the notice information in Claims Create Form.voidtestLaunchCreateSignedMark()Tests theEPPLaunchCreatecreate command extension with use of the code and mark in Sunrise Create Form.voidtestLaunchCreData()Tests theEPPLaunchCreDatacreate response extension.voidtestLaunchDelete()Tests theEPPLaunchDeletedelete command extension.voidtestLaunchInfData()Tests theEPPLaunchInfoinfo command extension.voidtestLaunchInfo()Tests theEPPLaunchInfoinfo command extension.voidtestLaunchTrademarkCheckForm()Tests thetestLaunchTrademarkCheckFormcheck command extension.voidtestLaunchUpdate()Tests theEPPLaunchUpdateupdate command extension.voidtestMark()Tests theEPPMarkclass.voidtestSignedMark()Tests theEPPSignedMarkclass.voidtestTrademarkHolderEnglishActive()Tests theEPPSignedMarkclass using the exact attributes defined in the SMD sample Trademark-Holder-English-Active.smd.-
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
-
testSignedMark
public void testSignedMark()
Tests theEPPSignedMarkclass. The tests include the following:
- Test signing with private key, without certificates and verification using public key
- Test signing with private key with certificates and verification using CA certificate
- Test signed mark XML encode / decode with XML signature validation
- Test base64 encoding and decoding and XML signature validation
- Test signing and verification with revoked certificate
-
testTrademarkHolderEnglishActive
public void testTrademarkHolderEnglishActive()
Tests theEPPSignedMarkclass using the exact attributes defined in the SMD sample Trademark-Holder-English-Active.smd.
-
testLaunchInfo
public void testLaunchInfo()
Tests theEPPLaunchInfoinfo command extension. The tests include the following:
- Test info command for launch application
- Test info command for launch registration
-
testLaunchInfData
public void testLaunchInfData()
Tests theEPPLaunchInfoinfo command extension. The tests include the following:
- Test info command for launch application
- Test info command for launch registration
-
testLaunchUpdate
public void testLaunchUpdate()
Tests theEPPLaunchUpdateupdate command extension. The tests include the following:
- Test update command for launch application
-
testLaunchDelete
public void testLaunchDelete()
Tests theEPPLaunchDeletedelete command extension. The tests include the following:
- Test delete command for launch application
-
testLaunchClaimsCheckForm
public void testLaunchClaimsCheckForm()
Tests thetestLaunchClaimsCheckFormcheck command extension. The tests include the following:
- Test Claims Check Form Command during the "claims" phase
- Test Claims Check Form Command during the "open" phase
- Test Claims Check Form Response
-
testLaunchAvailabilityCheckForm
public void testLaunchAvailabilityCheckForm()
Tests thetestLaunchAvailabilityCheckFormcheck command extension. The tests include the following:
- Test availability check command the custom "idn-release" launch phase
-
testLaunchTrademarkCheckForm
public void testLaunchTrademarkCheckForm()
Tests thetestLaunchTrademarkCheckFormcheck command extension. The tests include the following:
- Test Trademark Check Form Command
- Test Trademark Check Form Response
-
testLaunchCreateCodeMark
public void testLaunchCreateCodeMark()
Tests theEPPLaunchCreatecreate command extension with use of the code and mark in Sunrise Create Form. The tests include the following:
- Test create command for sunrise create using just one code
- Test create command for sunrise create using multiple codes
- Test create command for sunrise create using just one mark
- Test create command for sunrise create using one code and mark
-
testLaunchCreateGeneric
public void testLaunchCreateGeneric()
Tests theEPPLaunchCreatecreate command extension with use of the Generic Create Form:
- Test create command for landrush with no type defined
- Test create command for a landrush application
- Test create command for a landrush registration
-
testLaunchCreateSignedMark
public void testLaunchCreateSignedMark()
Tests theEPPLaunchCreatecreate command extension with use of the code and mark in Sunrise Create Form. The tests include the following:
- Test create signed mark in XML, sign it, validate it without encode/decode
- Test create signed mark in Base64, sign it, validate it without encode/decode
-
testLaunchCreateNotice
public void testLaunchCreateNotice()
Tests theEPPLaunchCreatecreate command extension with use of the notice information in Claims Create Form. The tests include the following:
- Test create command for sunrise create using the notice information
-
testLaunchCreData
public void testLaunchCreData()
Tests theEPPLaunchCreDatacreate response extension. The tests include the following:
- Test create response for launch application
-
testMark
public void testMark()
Tests theEPPMarkclass. The tests include the following:
- Test and encode/decode of mark
-
setUp
protected void setUp()
JUNITsetUpmethod, which sets the default client Id to "theRegistrar" and initializes theEPPDomainMapFactorywith theEPPCodec.- Overrides:
setUpin classjunit.framework.TestCase
-
tearDown
protected void tearDown()
JUNITtearDown, which currently does nothing.- Overrides:
tearDownin classjunit.framework.TestCase
-
suite
public static junit.framework.Test suite()
JUNITsuitestatic method, which returns the tests associated withEPPLaunchTst.- Returns:
Junittests
-
main
public static void main(java.lang.String[] args)
Main method for running tests using stand alone program.- Parameters:
args- Command line 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, java.util.List<java.lang.String> aCrls) throws java.lang.ExceptionLoads the trust store file and the Certificate Revocation List (CRL) file into thePKIXParametersused to verify the certificate chain and verify the certificate against the CRL. Both the Java Trust Store is loaded with the trusted root CA certificates (trust anchors) and the CRL file is attempted to be loaded to identify the revoked certificates. If the CRL file is not found, then no CRL checking will be done.- Parameters:
aTrustStoreName- Trust store file nameaCrls- List of Certificate Revocation List (CRL) file names- Returns:
- Initialized
PKIXParametersinstance. - 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.ExceptionLoads 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:
java.lang.Exception- Error loading the public key
-
-