diff options
author | 2020-03-18 09:38:27 +0100 | |
---|---|---|
committer | 2020-03-18 09:38:27 +0100 | |
commit | c85a8965e876fde2089582a6468eb02ce18bafd5 (patch) | |
tree | 1ab921ecfb1221f1e58d9ea7fd9d2be6e58acd47 /certService/src/test/java/org/onap/aaf/certservice/cmpv2client/external | |
parent | 15b97eff96d424102f1ced9d5bd37616260414a3 (diff) |
Resolve all checkstyle warnings
Issue-ID: AAF-1107
Signed-off-by: Bartosz Gardziejewski <bartosz.gardziejewski@nokia.com>
Change-Id: I28cfc2b82f1a4800a984e30f59ff36fe90bebb38
Diffstat (limited to 'certService/src/test/java/org/onap/aaf/certservice/cmpv2client/external')
-rw-r--r-- | certService/src/test/java/org/onap/aaf/certservice/cmpv2client/external/RdnTest.java (renamed from certService/src/test/java/org/onap/aaf/certservice/cmpv2client/external/RDNTest.java) | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/certService/src/test/java/org/onap/aaf/certservice/cmpv2client/external/RDNTest.java b/certService/src/test/java/org/onap/aaf/certservice/cmpv2client/external/RdnTest.java index 7a1f8be4..6e42afe8 100644 --- a/certService/src/test/java/org/onap/aaf/certservice/cmpv2client/external/RDNTest.java +++ b/certService/src/test/java/org/onap/aaf/certservice/cmpv2client/external/RdnTest.java @@ -31,19 +31,20 @@ import java.util.List; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; -class RDNTest { +class RdnTest { @Test - public void shouldCreateCorrectRDN() throws CertException { + void shouldCreateCorrectRdn() throws CertException { + // given + final String expectedValue = "ManagmentCA"; + final ASN1ObjectIdentifier expectedAoi = BCStyle.CN; + //when - RDN rdn1 = new RDN("CN=ManagmentCA"); - RDN rdn2 = new RDN("CN = ManagmentCA "); - RDN rdn3 = new RDN("CN", "ManagmentCA"); + Rdn rdn1 = new Rdn("CN=ManagmentCA"); + Rdn rdn2 = new Rdn("CN = ManagmentCA "); + Rdn rdn3 = new Rdn("CN", "ManagmentCA"); //then - String expectedValue = "ManagmentCA"; - ASN1ObjectIdentifier expectedAoi = BCStyle.CN; - assertEquals(expectedValue, rdn1.getValue()); assertEquals(expectedValue, rdn2.getValue()); assertEquals(expectedValue, rdn3.getValue()); @@ -53,7 +54,7 @@ class RDNTest { } @Test - public void shouldCorrectlySplitAndTrimString() { + void shouldCorrectlySplitAndTrimString() { //given String value1 = " T = Test"; List<String> expected1 = Arrays.asList("T", "Test"); @@ -62,8 +63,8 @@ class RDNTest { List<String> expected2 = Arrays.asList("This", "is 99 tested", "string"); //when - List<String> actual1 = RDN.parseRDN("=", value1); - List<String> actual2 = RDN.parseRDN("[0-9]{3,}", value2); + List<String> actual1 = Rdn.parseRdn("=", value1); + List<String> actual2 = Rdn.parseRdn("[0-9]{3,}", value2); //then assertEquals(expected1, actual1); @@ -71,8 +72,8 @@ class RDNTest { } @Test - public void shouldConvertAoiStringToEnum() throws CertException { - RDN rdn = new RDN("CN", "ManagmentCA"); + void shouldConvertAoiStringToEnum() throws CertException { + Rdn rdn = new Rdn("CN", "ManagmentCA"); assertEquals(BCStyle.CN, rdn.getAoi("CN")); assertEquals(BCStyle.C, rdn.getAoi("C")); @@ -92,4 +93,4 @@ class RDNTest { assertEquals(BCStyle.SERIALNUMBER, rdn.getAoi("SERIALNUMBER")); assertThrows(CertException.class, () -> rdn.getAoi("INVALIDTAG")); } -}
\ No newline at end of file +} |