コード例 #1
0
		public void ConvertAPIToSDK()
		{
			apiAuthScheme1 = CreateTypicalAPIAuthScheme();
			sdkAuthScheme1 = new AuthenticationMethodConverter(apiAuthScheme1).ToSDKAuthMethod();

			Assert.AreEqual(sdkAuthScheme1.ToString(), apiAuthScheme1.ToString());
		}
コード例 #2
0
		public void ConvertSDKToAPI()
		{
			sdkAuthScheme1 = CreateTypicalSDKAuthScheme();
			apiAuthScheme1 = new AuthenticationMethodConverter(sdkAuthScheme1).ToAPIAuthMethod();

			Assert.AreEqual(AuthScheme.NONE, apiAuthScheme1);
		}
コード例 #3
0
        public void ConvertAPIToSDK()
        {
            apiAuthScheme1 = CreateTypicalAPIAuthScheme();
            sdkAuthScheme1 = new AuthenticationMethodConverter(apiAuthScheme1).ToSDKAuthMethod();

            Assert.AreEqual(sdkAuthScheme1.ToString(), apiAuthScheme1.ToString());
        }
コード例 #4
0
        public void ConvertSDKToAPI()
        {
            sdkAuthScheme1 = CreateTypicalSDKAuthScheme();
            apiAuthScheme1 = new AuthenticationMethodConverter(sdkAuthScheme1).ToAPIAuthMethod();

            Assert.AreEqual(AuthScheme.NONE, apiAuthScheme1);
        }
コード例 #5
0
        public void ConvertSDKChallengeToAPIChallenge()
        {
            sdkAuthScheme1 = Silanis.ESL.SDK.AuthenticationMethod.CHALLENGE;
            apiAuthScheme1 = new AuthenticationMethodConverter(sdkAuthScheme1).ToAPIAuthMethod();

            Assert.AreEqual("CHALLENGE", apiAuthScheme1);
        }
コード例 #6
0
        public void ConvertSDKSMSToAPISMS()
        {
            sdkAuthScheme1 = Silanis.ESL.SDK.AuthenticationMethod.SMS;
            apiAuthScheme1 = new AuthenticationMethodConverter(sdkAuthScheme1).ToAPIAuthMethod();

            Assert.AreEqual("SMS", apiAuthScheme1);
        }
コード例 #7
0
        public void ConvertSDKToAPI()
        {
            sdkAuthScheme1 = Silanis.ESL.SDK.AuthenticationMethod.EMAIL;
            apiAuthScheme1 = new AuthenticationMethodConverter(sdkAuthScheme1).ToAPIAuthMethod();

            Assert.AreEqual(AuthenticationMethod.EMAIL.getApiValue(), apiAuthScheme1);
        }
コード例 #8
0
        public void ConvertSDKEmailToAPINone()
        {
            sdkAuthScheme1 = Silanis.ESL.SDK.AuthenticationMethod.EMAIL;
            apiAuthScheme1 = new AuthenticationMethodConverter(sdkAuthScheme1).ToAPIAuthMethod();

            Assert.AreEqual("NONE", apiAuthScheme1);
        }
コード例 #9
0
        public void ConvertAPIUnknonwnValueToUnrecognizedAuthenticationMethod()
        {
            apiAuthScheme1 = "NEWLY_ADDED_AUTHENTICATION_METHOD";
            sdkAuthScheme1 = new AuthenticationMethodConverter(apiAuthScheme1).ToSDKAuthMethod();

            Assert.AreEqual(sdkAuthScheme1.getApiValue(), apiAuthScheme1);
        }
コード例 #10
0
        public void ConvertAPIKBAToKBAAuthenticationMethod()
        {
            apiAuthScheme1 = "KBA";
            sdkAuthScheme1 = new AuthenticationMethodConverter(apiAuthScheme1).ToSDKAuthMethod();

            Assert.AreEqual(sdkAuthScheme1.getApiValue(), apiAuthScheme1);
        }
コード例 #11
0
        public void ConvertAPICHALLENGEToCHALLENGEAuthenticationMethod()
        {
            apiAuthScheme1 = "CHALLENGE";
            sdkAuthScheme1 = new AuthenticationMethodConverter(apiAuthScheme1).ToSDKAuthMethod();

            Assert.AreEqual(sdkAuthScheme1.getApiValue(), apiAuthScheme1);
        }
コード例 #12
0
        public void ConvertAPINONEToEMAILAuthenticationMethod()
        {
            apiAuthScheme1 = "NONE";
            sdkAuthScheme1 = new AuthenticationMethodConverter(apiAuthScheme1).ToSDKAuthMethod();

            Assert.AreEqual(sdkAuthScheme1.getApiValue(), apiAuthScheme1);
        }
コード例 #13
0
        public void ConvertAPIToSDK()
        {
            apiAuthScheme1 = Silanis.ESL.SDK.AuthenticationMethod.SMS.getApiValue();
            sdkAuthScheme1 = new AuthenticationMethodConverter(apiAuthScheme1).ToSDKAuthMethod();

            Assert.AreEqual(sdkAuthScheme1.getApiValue(), apiAuthScheme1);
        }
コード例 #14
0
 public Authentication(AuthenticationMethod method)
 {
     this.method = method;
 }