From 28fa18278c1f3a87722d5e8b78f581526a30bb38 Mon Sep 17 00:00:00 2001 From: Yuuta Liang Date: Sat, 14 Oct 2023 05:35:17 +0800 Subject: Fix lint Signed-off-by: Yuuta Liang --- src/test/model/pki/crl/CertificateListTest.java | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) (limited to 'src/test/model/pki/crl/CertificateListTest.java') diff --git a/src/test/model/pki/crl/CertificateListTest.java b/src/test/model/pki/crl/CertificateListTest.java index 0f4f06c..c117c16 100644 --- a/src/test/model/pki/crl/CertificateListTest.java +++ b/src/test/model/pki/crl/CertificateListTest.java @@ -5,17 +5,13 @@ import model.asn1.ASN1Object; import model.asn1.BitString; import model.asn1.Null; import model.asn1.ObjectIdentifier; -import model.asn1.exceptions.ParseException; -import model.asn1.parsing.BytesReader; import model.pki.AlgorithmIdentifier; -import model.pki.cert.Certificate; -import model.pki.cert.TbsCertificate; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import static model.TestConstants.combine; -import static model.TestConstants.mutate; -import static org.junit.jupiter.api.Assertions.*; +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; public class CertificateListTest { private CertificateList crl; @@ -27,7 +23,7 @@ public class CertificateListTest { new AlgorithmIdentifier(ASN1Object.TAG_SEQUENCE, null, new ObjectIdentifier(ObjectIdentifier.TAG, null, ObjectIdentifier.OID_RSA_ENCRYPTION), new Null(Null.TAG, null)), - new BitString(BitString.TAG, null, 0, new Byte[]{ 1, 2, 3 })); + new BitString(BitString.TAG, null, 0, new Byte[]{1, 2, 3})); } @Test @@ -35,18 +31,18 @@ public class CertificateListTest { assertEquals(2, crl.getCrl().getRevokedCertificates().length); assertArrayEquals(ObjectIdentifier.OID_RSA_ENCRYPTION, crl.getSignatureAlgorithm().getType().getInts()); - assertArrayEquals(new Byte[]{ 1, 2, 3 }, + assertArrayEquals(new Byte[]{1, 2, 3}, crl.getSignature().getConvertedVal()); } @Test void testEncode() { assertArrayEquals(combine((byte) 0x30, - TestConstants.CRL_CONTENT_1_DER, - new AlgorithmIdentifier(ASN1Object.TAG_SEQUENCE, null, - new ObjectIdentifier(ObjectIdentifier.TAG, null, ObjectIdentifier.OID_RSA_ENCRYPTION), - new Null(Null.TAG, null)).encodeDER(), - new BitString(BitString.TAG, null, 0, new Byte[]{ 1, 2, 3 }).encodeDER()), + TestConstants.CRL_CONTENT_1_DER, + new AlgorithmIdentifier(ASN1Object.TAG_SEQUENCE, null, + new ObjectIdentifier(ObjectIdentifier.TAG, null, ObjectIdentifier.OID_RSA_ENCRYPTION), + new Null(Null.TAG, null)).encodeDER(), + new BitString(BitString.TAG, null, 0, new Byte[]{1, 2, 3}).encodeDER()), crl.encodeDER()); } } -- cgit v1.2.3