Package es.gob.afirma.signature
Class XadesSignerTest
- java.lang.Object
-
- junit.framework.Assert
-
- junit.framework.TestCase
-
- es.gob.afirma.signature.AbstractSignatureTest
-
- es.gob.afirma.signature.XadesSignerTest
-
- All Implemented Interfaces:
junit.framework.Test
public class XadesSignerTest extends AbstractSignatureTest
Class that defines tests for
Project:XadesSigner.@Firma and TS@ Web Services Integration Platform.
- Version:
- 1.2, 14/03/2017.
-
-
Constructor Summary
Constructors Constructor Description XadesSignerTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidtestCoSignDetached()Tests for generating detached co-signatures.voidtestCoSignECCEnveloping()Tests for generating enveloping co-signatures with a ECC certificate.voidtestCoSignEnveloped()Tests for generating enveloped co-signatures.voidtestCoSignEnveloping()Tests for generating enveloping co-signatures.voidtestCoSignExternallyDetached()Tests for generating externally detached co-signatures.voidtestCoSignExternallyECCDetached()Tests for generating externally detached co-signatures with a ECC certificate.voidtestCoSignInvalidValues()Tests forXadesSigner.coSign(byte[], byte[], String, java.security.KeyStore.PrivateKeyEntry, Properties, boolean, String, String)with invalid values.voidtestCoSignWithTimestamp()Tests for generating XAdES co-signatures with timestamp.voidtestCounterSignCoSign()Test for generating a counter-signature from a co-signature.voidtestCounterSignCounterCoSign()Test for generating a counter-signature from a counter-signature generated from a co-signature.voidtestCounterSignCounterSign()Test for generating a counter-signature from a counter-signature.voidtestCounterSignDetached()Tests for generating detached counter-signatures.voidtestCounterSignECCDetached()Tests for generating detached counter-signatures with a ECC certificate.voidtestCounterSignInvalidValues()Tests forXadesSigner.counterSign(byte[], String, java.security.KeyStore.PrivateKeyEntry, Properties, boolean, String, String)with invalid values.voidtestCounterSignWithTimestamp()Tests for generating XAdES counter-signatures with timestamp.voidtestGetSignedData()Test for methodsXadesSigner.getSignedData(byte[]).voidtestSignBinaryDetached()Tests for signing a binary file as a detached signature.voidtestSignBinaryEnveloped()Tests for signing a binary file as an enveloped signature.voidtestSignBinaryEnveloping()Tests for signing a binary file as an enveloping signature.voidtestSignECCXmlDetached()Tests for signing a XML file as a detached signature with a ECC certificate.voidtestSignExternallyDetached()Tests for signing as an externally detached signature.voidtestSignInvalidValues()Tests forXadesSigner.sign(byte[], String, String, java.security.KeyStore.PrivateKeyEntry, Properties, boolean, String, String)with invalid values.voidtestSignOtherAlgorithms()Tests for signing a binary file as an enveloping signature with SHA-512.voidtestSignWithPolicy()Tests for signing a XML file as an enveloping signature with signature policies.voidtestSignWithTimestamp()Tests for generating XAdES signatures with timestamp.voidtestSignXmlDetached()Tests for signing a XML file as a detached signature.voidtestSignXmlEnveloped()Tests for signing a XML file as an enveloped signature.voidtestSignXmlEnveloping()Tests for signing a XML file as an enveloping signature.voidtestUpgrade()Tests forXadesSigner.upgrade(byte[], List).voidtestValidate()Tests forXadesSigner.verifySignature(byte[]).-
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, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, setName, toString
-
-
-
-
Method Detail
-
testSignInvalidValues
public void testSignInvalidValues() throws java.lang.ExceptionTests forXadesSigner.sign(byte[], String, String, java.security.KeyStore.PrivateKeyEntry, Properties, boolean, String, String)with invalid values.- Throws:
java.lang.Exception- If the test fails.
-
testSignBinaryEnveloping
public void testSignBinaryEnveloping() throws java.lang.ExceptionTests for signing a binary file as an enveloping signature.- Throws:
java.lang.Exception- If the test fails.
-
testSignXmlEnveloping
public void testSignXmlEnveloping() throws java.lang.ExceptionTests for signing a XML file as an enveloping signature.- Throws:
java.lang.Exception- If the test fails.
-
testSignBinaryEnveloped
public void testSignBinaryEnveloped() throws java.lang.ExceptionTests for signing a binary file as an enveloped signature.- Throws:
java.lang.Exception- If the test fails.
-
testSignXmlEnveloped
public void testSignXmlEnveloped() throws java.lang.ExceptionTests for signing a XML file as an enveloped signature.- Throws:
java.lang.Exception- If the test fails.
-
testSignBinaryDetached
public void testSignBinaryDetached() throws java.lang.ExceptionTests for signing a binary file as a detached signature.- Throws:
java.lang.Exception- If the test fails.
-
testSignXmlDetached
public void testSignXmlDetached() throws java.lang.ExceptionTests for signing a XML file as a detached signature.- Throws:
java.lang.Exception- If the test fails.
-
testSignECCXmlDetached
public void testSignECCXmlDetached() throws java.lang.ExceptionTests for signing a XML file as a detached signature with a ECC certificate.- Throws:
java.lang.Exception- If the test fails.
-
testSignExternallyDetached
public void testSignExternallyDetached() throws java.lang.ExceptionTests for signing as an externally detached signature.- Throws:
java.lang.Exception- If the test fails.
-
testSignOtherAlgorithms
public void testSignOtherAlgorithms() throws java.lang.ExceptionTests for signing a binary file as an enveloping signature with SHA-512.- Throws:
java.lang.Exception- If the test fails.
-
testSignWithPolicy
public void testSignWithPolicy() throws java.lang.ExceptionTests for signing a XML file as an enveloping signature with signature policies.- Throws:
java.lang.Exception- If the test fails.
-
testCoSignInvalidValues
public void testCoSignInvalidValues() throws java.lang.ExceptionTests forXadesSigner.coSign(byte[], byte[], String, java.security.KeyStore.PrivateKeyEntry, Properties, boolean, String, String)with invalid values.- Throws:
java.lang.Exception- If the test fails.
-
testCoSignEnveloping
public void testCoSignEnveloping() throws java.lang.ExceptionTests for generating enveloping co-signatures.- Throws:
java.lang.Exception- If the test fails.
-
testCoSignECCEnveloping
public void testCoSignECCEnveloping() throws java.lang.ExceptionTests for generating enveloping co-signatures with a ECC certificate.- Throws:
java.lang.Exception- If the test fails.
-
testCoSignEnveloped
public void testCoSignEnveloped() throws java.lang.ExceptionTests for generating enveloped co-signatures.- Throws:
java.lang.Exception- If the test fails.
-
testCoSignDetached
public void testCoSignDetached() throws java.lang.ExceptionTests for generating detached co-signatures.- Throws:
java.lang.Exception- If the test fails.
-
testCoSignExternallyDetached
public void testCoSignExternallyDetached() throws java.lang.ExceptionTests for generating externally detached co-signatures.- Throws:
java.lang.Exception- If the test fails.
-
testCoSignExternallyECCDetached
public void testCoSignExternallyECCDetached() throws java.lang.ExceptionTests for generating externally detached co-signatures with a ECC certificate.- Throws:
java.lang.Exception- If the test fails.
-
testCounterSignInvalidValues
public void testCounterSignInvalidValues() throws java.lang.ExceptionTests forXadesSigner.counterSign(byte[], String, java.security.KeyStore.PrivateKeyEntry, Properties, boolean, String, String)with invalid values.- Throws:
java.lang.Exception- If the test fails.
-
testCounterSignDetached
public void testCounterSignDetached() throws java.lang.ExceptionTests for generating detached counter-signatures.- Throws:
java.lang.Exception- If the test fails.
-
testCounterSignECCDetached
public void testCounterSignECCDetached() throws java.lang.ExceptionTests for generating detached counter-signatures with a ECC certificate.- Throws:
java.lang.Exception- If the test fails.
-
testCounterSignCoSign
public void testCounterSignCoSign() throws java.lang.ExceptionTest for generating a counter-signature from a co-signature.- Throws:
java.lang.Exception- If the test fails.
-
testCounterSignCounterSign
public void testCounterSignCounterSign() throws java.lang.ExceptionTest for generating a counter-signature from a counter-signature.- Throws:
java.lang.Exception- If the test fails.
-
testCounterSignCounterCoSign
public void testCounterSignCounterCoSign() throws java.lang.ExceptionTest for generating a counter-signature from a counter-signature generated from a co-signature.- Throws:
java.lang.Exception- If the test fails.
-
testSignWithTimestamp
public void testSignWithTimestamp()
Tests for generating XAdES signatures with timestamp.
-
testCoSignWithTimestamp
public void testCoSignWithTimestamp()
Tests for generating XAdES co-signatures with timestamp.
-
testCounterSignWithTimestamp
public void testCounterSignWithTimestamp()
Tests for generating XAdES counter-signatures with timestamp.
-
testValidate
public void testValidate()
Tests forXadesSigner.verifySignature(byte[]).
-
testUpgrade
public void testUpgrade()
Tests forXadesSigner.upgrade(byte[], List).
-
testGetSignedData
public final void testGetSignedData()
Test for methodsXadesSigner.getSignedData(byte[]).
-
-