public void ConvertSDKToSDK() { sdkAuth1 = CreateTypicalSDKAuthentication(); converter = new AuthenticationConverter(sdkAuth1); sdkAuth2 = converter.ToSDKAuthentication(); Assert.IsNotNull(sdkAuth2); Assert.AreEqual(sdkAuth2, sdkAuth1); }
public void ConvertSDKToAPI() { sdkAuth1 = CreateTypicalSDKAuthentication(); apiAuth1 = new AuthenticationConverter(sdkAuth1).ToAPIAuthentication(); Assert.IsNotNull(apiAuth1); Assert.AreEqual(apiAuth1.Scheme, sdkAuth1.Method.getApiValue()); Assert.AreEqual(apiAuth1.Challenges[0].Question, sdkAuth1.Challenges[0].Question); Assert.AreEqual(apiAuth1.Challenges[0].Answer, sdkAuth1.Challenges[0].Answer); }
public void ConvertAPIToSDK() { apiAuth1 = CreateTypicalAPIAuthentication(); sdkAuth1 = new AuthenticationConverter(apiAuth1).ToSDKAuthentication(); Assert.IsNotNull(sdkAuth1); Assert.AreEqual(sdkAuth1.Method.getApiValue(), apiAuth1.Scheme); Assert.AreEqual(sdkAuth1.Challenges[0].Question, apiAuth1.Challenges[0].Question); Assert.AreEqual(sdkAuth1.Challenges[0].Answer, apiAuth1.Challenges[0].Answer); }
public void ConvertNullSDKToAPI() { sdkAuth1 = null; converter = new AuthenticationConverter(sdkAuth1); Assert.IsNull(converter.ToAPIAuthentication()); }