summaryrefslogtreecommitdiffstats
path: root/certServiceClient/src/test
diff options
context:
space:
mode:
authorpwielebs <piotr.wielebski@nokia.com>2020-03-18 07:59:14 +0100
committerBogumil Zebek <bogumil.zebek@nokia.com>2020-03-18 11:41:56 +0000
commit0d4320e07d220219876e77f5faf301be3a8a8a49 (patch)
tree1aa87db719864a79597eb181267fcd6c74efa6a3 /certServiceClient/src/test
parentc16d738408ceef496be1d8bb1b22f6c0d868e6fc (diff)
Improve validation of country code
Issue-ID: AAF-1107 Signed-off-by: pwielebs <piotr.wielebski@nokia.com> Change-Id: Id8c1ca149fd65746a02ee480cfc8abbb6b9f7b5c
Diffstat (limited to 'certServiceClient/src/test')
-rw-r--r--certServiceClient/src/test/java/org/onap/aaf/certservice/client/configuration/factory/AbstractConfigurationFactoryTest.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/certServiceClient/src/test/java/org/onap/aaf/certservice/client/configuration/factory/AbstractConfigurationFactoryTest.java b/certServiceClient/src/test/java/org/onap/aaf/certservice/client/configuration/factory/AbstractConfigurationFactoryTest.java
index edefc4de..c5955555 100644
--- a/certServiceClient/src/test/java/org/onap/aaf/certservice/client/configuration/factory/AbstractConfigurationFactoryTest.java
+++ b/certServiceClient/src/test/java/org/onap/aaf/certservice/client/configuration/factory/AbstractConfigurationFactoryTest.java
@@ -43,13 +43,13 @@ public class AbstractConfigurationFactoryTest {
}
@ParameterizedTest
- @ValueSource(strings = {"PL", "DE", "PT", "US"})
+ @ValueSource(strings = {"PL", "DE", "PN", "US", "IO", "CA", "KH", "CO", "DK", "EC", "CZ", "CN", "BR", "BD", "BE"})
public void shouldAcceptValidCountryCode(String countryCode) {
assertThat(cut.isCountryValid(countryCode)).isTrue();
}
@ParameterizedTest
- @ValueSource(strings = {"1P", "PLP", "P#", "&*"})
+ @ValueSource(strings = {"", "QQ", "AFG", "D", "&*", "!", "ONAP", "p", "pl", "us", "afg"})
public void shouldRejectInvalidCountryCode(String countryCode) {
assertThat(cut.isCountryValid(countryCode)).isFalse();
}
@@ -77,4 +77,4 @@ public class AbstractConfigurationFactoryTest {
public void shouldRejectInvalidCommonName(String commonName) {
assertThat(cut.isCommonNameValid(commonName)).isFalse();
}
-} \ No newline at end of file
+}