예제 #1
0
		public Signer( GroupId groupId )
		{
			GroupId = groupId;
			Email = null;
			FirstName = null;
			LastName = null;
			authentication = new Authentication(AuthenticationMethod.EMAIL);
		}
예제 #2
0
		public Signer (string signerEmail, string firstName, string lastName, Authentication authentication)
		{
			Email = signerEmail;
			FirstName = firstName;
			LastName = lastName;
			this.authentication = authentication;
			this.GroupId = null;
		}
        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);
        }
        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
 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);
        }
        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);
        }
        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;
        }
 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());
 }