コード例 #1
0
ファイル: Signer.cs プロジェクト: vtcharlie/esl.sdk.net
		public Signer( GroupId groupId )
		{
			GroupId = groupId;
			Email = null;
			FirstName = null;
			LastName = null;
			authentication = new Authentication(AuthenticationMethod.EMAIL);
		}
コード例 #2
0
ファイル: Signer.cs プロジェクト: vtcharlie/esl.sdk.net
		public Signer (string signerEmail, string firstName, string lastName, Authentication authentication)
		{
			Email = signerEmail;
			FirstName = firstName;
			LastName = lastName;
			this.authentication = authentication;
			this.GroupId = null;
		}
コード例 #3
0
        public void ConvertSDKToSDK()
        {
            sdkAuth1 = CreateTypicalSDKAuthentication();
            converter = new AuthenticationConverter(sdkAuth1);
            sdkAuth2 = converter.ToSDKAuthentication();

            Assert.IsNotNull(sdkAuth2);
            Assert.AreEqual(sdkAuth2, sdkAuth1);
        }
コード例 #4
0
        public void ConvertSDKToSDK()
        {
            sdkAuth1  = CreateTypicalSDKAuthentication();
            converter = new AuthenticationConverter(sdkAuth1);
            sdkAuth2  = converter.ToSDKAuthentication();

            Assert.IsNotNull(sdkAuth2);
            Assert.AreEqual(sdkAuth2, sdkAuth1);
        }
コード例 #5
0
        public void ConvertAPIToSDK()
        {
            apiAuth1 = CreateTypicalAPIAuthentication();
            sdkAuth1 = new AuthenticationConverter(apiAuth1).ToSDKAuthentication();

            Assert.IsNotNull(sdkAuth1);
            Assert.AreEqual(sdkAuth1.Method.ToString(), apiAuth1.Scheme.ToString());
            Assert.AreEqual(sdkAuth1.Challenges[0].Question, apiAuth1.Challenges[0].Question);
            Assert.AreEqual(sdkAuth1.Challenges[0].Answer, apiAuth1.Challenges[0].Answer);
        }
コード例 #6
0
ファイル: Signer.cs プロジェクト: vtcharlie/esl.sdk.net
 public Signer(string id)
 {
     GroupId = null;
     FirstName = null;
     LastName = null;
     Email = null;
     authentication = null;
     this.Id = id;
     authentication = new Authentication(Silanis.ESL.SDK.AuthenticationMethod.EMAIL);
 }
コード例 #7
0
        public void ConvertSDKToAPI()
        {
            sdkAuth1 = CreateTypicalSDKAuthentication();
            apiAuth1 = new AuthenticationConverter(sdkAuth1).ToAPIAuthentication();

            Assert.IsNotNull(apiAuth1);
            Assert.AreEqual(apiAuth1.Scheme.ToString(), sdkAuth1.Method.ToString());
            Assert.AreEqual(apiAuth1.Challenges[0].Question, sdkAuth1.Challenges[0].Question);
            Assert.AreEqual(apiAuth1.Challenges[0].Answer, sdkAuth1.Challenges[0].Answer);
        }
コード例 #8
0
        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);
        }
コード例 #9
0
        private Silanis.ESL.SDK.Authentication CreateTypicalSDKAuthentication()
        {
            IList<Challenge> sdkChallenges = new List<Challenge>();
            sdkChallenges.Add(new Challenge("What is the name of your dog?", "Max"));
            Authentication result = new Authentication(sdkChallenges);

            return result;
        }
コード例 #10
0
 public void ConvertNullSDKToAPI()
 {
     sdkAuth1 = null;
     converter = new AuthenticationConverter(sdkAuth1);
     Assert.IsNull(converter.ToAPIAuthentication());
 }
コード例 #11
0
 public void ConvertNullSDKToAPI()
 {
     sdkAuth1  = null;
     converter = new AuthenticationConverter(sdkAuth1);
     Assert.IsNull(converter.ToAPIAuthentication());
 }