X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=src%2Ftest%2Fjava%2Forg%2Fopenecomp%2Frestclient%2Fenums%2FRestAuthenticationModeTest.java;fp=src%2Ftest%2Fjava%2Forg%2Fopenecomp%2Frestclient%2Fenums%2FRestAuthenticationModeTest.java;h=f4b280bd24ad8c0af8ca87dc0b4d2e3e73e08143;hb=f709acf2e6fc372ed36e0d2612a0b25ff1d582de;hp=0000000000000000000000000000000000000000;hpb=80fa392258c5ea6f88e99441630b7c303237b1d1;p=aai%2Frest-client.git diff --git a/src/test/java/org/openecomp/restclient/enums/RestAuthenticationModeTest.java b/src/test/java/org/openecomp/restclient/enums/RestAuthenticationModeTest.java new file mode 100644 index 0000000..f4b280b --- /dev/null +++ b/src/test/java/org/openecomp/restclient/enums/RestAuthenticationModeTest.java @@ -0,0 +1,33 @@ +package org.openecomp.restclient.enums; + +import static org.junit.Assert.assertEquals; + +import org.junit.Before; +import org.junit.Test; + +public class RestAuthenticationModeTest { + + /** + * Test case initialization + * + * @throws Exception the exception + */ + @Before + public void init() throws Exception { + } + + @Test + public void validateEnumMappings() { + + assertEquals(RestAuthenticationMode.getRestAuthenticationMode(null), RestAuthenticationMode.UNKNOWN_MODE); + assertEquals(RestAuthenticationMode.getRestAuthenticationMode("OAuth"), RestAuthenticationMode.UNKNOWN_MODE); + assertEquals(RestAuthenticationMode.getRestAuthenticationMode("SSL_BASIC"), RestAuthenticationMode.SSL_BASIC); + assertEquals(RestAuthenticationMode.getRestAuthenticationMode("SSL_CERT"), RestAuthenticationMode.SSL_CERT); + assertEquals(RestAuthenticationMode.getRestAuthenticationMode("HTTP_NOAUTH"), RestAuthenticationMode.HTTP_NOAUTH); + + assertEquals(RestAuthenticationMode.SSL_BASIC.getAuthenticationModeLabel(),"SSL_BASIC"); + + + } + +}