public void ConvertAPIUnknonwnValueToUnrecognizedAuthenticationMethod()
        {
            apiAuthScheme1 = "NEWLY_ADDED_AUTHENTICATION_METHOD";
            sdkAuthScheme1 = new AuthenticationMethodConverter(apiAuthScheme1).ToSDKAuthMethod();

            Assert.AreEqual(sdkAuthScheme1.getApiValue(), apiAuthScheme1);
        }
        public void ConvertAPIKBAToKBAAuthenticationMethod()
        {
            apiAuthScheme1 = "KBA";
            sdkAuthScheme1 = new AuthenticationMethodConverter(apiAuthScheme1).ToSDKAuthMethod();

            Assert.AreEqual(sdkAuthScheme1.getApiValue(), apiAuthScheme1);
        }
        public void ConvertAPICHALLENGEToCHALLENGEAuthenticationMethod()
        {
            apiAuthScheme1 = "CHALLENGE";
            sdkAuthScheme1 = new AuthenticationMethodConverter(apiAuthScheme1).ToSDKAuthMethod();

            Assert.AreEqual(sdkAuthScheme1.getApiValue(), apiAuthScheme1);
        }
        public void ConvertAPINONEToEMAILAuthenticationMethod()
        {
            apiAuthScheme1 = "NONE";
            sdkAuthScheme1 = new AuthenticationMethodConverter(apiAuthScheme1).ToSDKAuthMethod();

            Assert.AreEqual(sdkAuthScheme1.getApiValue(), apiAuthScheme1);
        }
        public void ConvertAPIToSDK()
        {
            apiAuthScheme1 = Silanis.ESL.SDK.AuthenticationMethod.SMS.getApiValue();
            sdkAuthScheme1 = new AuthenticationMethodConverter(apiAuthScheme1).ToSDKAuthMethod();

            Assert.AreEqual(sdkAuthScheme1.getApiValue(), apiAuthScheme1);
        }
Esempio n. 6
0
 static AuthenticationMethod()
 {
     allAuthenticationMethods.Add(EMAIL.getApiValue(), AuthenticationMethod.EMAIL);
     allAuthenticationMethods.Add(CHALLENGE.getApiValue(), AuthenticationMethod.CHALLENGE);
     allAuthenticationMethods.Add(SMS.getApiValue(), AuthenticationMethod.SMS);
     allAuthenticationMethods.Add(KBA.getApiValue(), AuthenticationMethod.KBA);
 }