diff options
Diffstat (limited to 'certService/src/test')
3 files changed, 7 insertions, 7 deletions
diff --git a/certService/src/test/java/org/onap/aaf/certservice/api/CertificationServiceTest.java b/certService/src/test/java/org/onap/aaf/certservice/api/CertificationServiceTest.java index 99ca09b9..9367fcb1 100644 --- a/certService/src/test/java/org/onap/aaf/certservice/api/CertificationServiceTest.java +++ b/certService/src/test/java/org/onap/aaf/certservice/api/CertificationServiceTest.java @@ -67,7 +67,7 @@ class CertificationServiceTest { certificationService.signCertificate("TestCa", "encryptedCSR", "encryptedPK"); // then - assertEquals(testResponse.getStatusCode(), HttpStatus.OK); + assertEquals(HttpStatus.OK, testResponse.getStatusCode()); assertTrue( testResponse.toString().contains(testStringCsr) ); diff --git a/certService/src/test/java/org/onap/aaf/certservice/certification/PemObjectFactoryTest.java b/certService/src/test/java/org/onap/aaf/certservice/certification/PemObjectFactoryTest.java index 67d7f1dc..2fa747db 100644 --- a/certService/src/test/java/org/onap/aaf/certservice/certification/PemObjectFactoryTest.java +++ b/certService/src/test/java/org/onap/aaf/certservice/certification/PemObjectFactoryTest.java @@ -46,7 +46,7 @@ class PemObjectFactoryTest { @Test void shouldTransformStringInToPemObjectAndBackToString() throws CsrDecryptionException { // when - PemObject pemObject = pemObjectFactory.createPmObject(TEST_PEM); + PemObject pemObject = pemObjectFactory.createPemObject(TEST_PEM); String parsedPemObject = pemObjectToString(pemObject); // then @@ -57,7 +57,7 @@ class PemObjectFactoryTest { void shouldThrowExceptionWhenParsingPemFailed() { // when Exception exception = assertThrows( - CsrDecryptionException.class, () -> pemObjectFactory.createPmObject(TEST_WRONG_PEM) + CsrDecryptionException.class, () -> pemObjectFactory.createPemObject(TEST_WRONG_PEM) ); String expectedMessage = "Unable to create PEM"; diff --git a/certService/src/test/java/org/onap/aaf/certservice/certification/model/CsrModelTest.java b/certService/src/test/java/org/onap/aaf/certservice/certification/model/CsrModelTest.java index ffce61d8..c6ff2a9f 100644 --- a/certService/src/test/java/org/onap/aaf/certservice/certification/model/CsrModelTest.java +++ b/certService/src/test/java/org/onap/aaf/certservice/certification/model/CsrModelTest.java @@ -77,7 +77,7 @@ class CsrModelTest { .thenReturn(wrongKryInfo); when(wrongKryInfo.getEncoded()) .thenThrow(new IOException()); - PemObject testPrivateKey = pemObjectFactory.createPmObject(TEST_PK); + PemObject testPrivateKey = pemObjectFactory.createPemObject(TEST_PK); CsrModel csrModel = new CsrModel(testCsr, testPrivateKey); // when @@ -96,16 +96,16 @@ class CsrModelTest { private CsrModel generateTestCsrModel() throws CsrDecryptionException, IOException { PemObjectFactory pemObjectFactory = new PemObjectFactory(); PKCS10CertificationRequest testCsr = new PKCS10CertificationRequest( - pemObjectFactory.createPmObject(TEST_CSR).getContent() + pemObjectFactory.createPemObject(TEST_CSR).getContent() ); - PemObject testPrivateKey = pemObjectFactory.createPmObject(TEST_PK); + PemObject testPrivateKey = pemObjectFactory.createPemObject(TEST_PK); return new CsrModel(testCsr, testPrivateKey); } private PemObject generateTestPublicKey() throws CsrDecryptionException, IOException { PemObjectFactory pemObjectFactory = new PemObjectFactory(); PKCS10CertificationRequest testCsr = new PKCS10CertificationRequest( - pemObjectFactory.createPmObject(TEST_CSR).getContent() + pemObjectFactory.createPemObject(TEST_CSR).getContent() ); return new PemObject("PUBLIC KEY", testCsr.getSubjectPublicKeyInfo().getEncoded()); } |