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); }
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); }