예제 #1
0
        public void IsValidTest1()
        {
            IAuthenticationProvider authenticationProvider = new AuthenticationProvider(new HttpRuntimeCache());
            ICaptchaProvider captchaProvider = new ReCaptchaProvider();
            IEmailProvider emailProvider = new EmailProvider();
            IMobileProvider mobileProvider = new MobileProvider();
            var target = new AccountProvider(authenticationProvider, captchaProvider, emailProvider, mobileProvider);

            bool expected = false;
            bool actual;
            actual = target.IsValid(accountId, "123");
            Assert.AreEqual(actual, expected);
        }
예제 #2
0
 public void IsValidTest()
 {
     IAuthenticationProvider authenticationProvider = new AuthenticationProvider(new HttpRuntimeCache());
     ICaptchaProvider captchaProvider = new ReCaptchaProvider();
     IEmailProvider emailProvider = new EmailProvider();
     IMobileProvider mobileProvider = new MobileProvider();
     var target = new AccountProvider(authenticationProvider, captchaProvider, emailProvider, mobileProvider);
     string authenticationId = authenticationProvider.CreateAuthenticationId(accountId);
     bool expected = true;
     bool actual;
     actual = target.IsValid(authenticationId);
     Assert.AreEqual(expected, actual);
 }