public void LoginByNameAndPersistentDoesNotThrowIfNoAnyProfiderSet( string userName, bool persistent) { var sut = new SwitchingAuthenticationProvider(); sut.Login(userName, persistent); }
public void LoginCallsSwithcedProviderIfNotNull( AuthenticationProvider switchedProvider) { using (new Switcher <AuthenticationProvider>(switchedProvider)) { var sut = new SwitchingAuthenticationProvider(); sut.Login(this.user); switchedProvider.Received().Login(this.user); } }
public void LoginCallsDefaultProviderIfNotSwitched( AuthenticationProvider defaultProvider) { var sut = new SwitchingAuthenticationProvider { DefaultProvider = defaultProvider }; sut.Login(this.user); defaultProvider.Received().Login(this.user); }
public void LoginByNameAndPersistentCallsSwithcedProviderIfNotNull( AuthenticationProvider switchedProvider, string userName, bool persistent) { using (new Switcher <AuthenticationProvider>(switchedProvider)) { var sut = new SwitchingAuthenticationProvider(); sut.Login(userName, persistent); switchedProvider.Received().Login(userName, persistent); } }
public void LoginByNameAndPersistentCallsDefaultProviderIfNotSwitched( AuthenticationProvider defaultProvider, string userName, bool persistent) { var sut = new SwitchingAuthenticationProvider { DefaultProvider = defaultProvider }; sut.Login(userName, persistent); defaultProvider.Received().Login(userName, persistent); }
public void LogoutDoesNotThrowIfNoAnyProfiderSet() { var sut = new SwitchingAuthenticationProvider(); sut.Logout(); }
public SwitchingAuthenticationProviderTest() { this.provider = new SwitchingAuthenticationProvider(); this.user = User.FromName(@"extranet\Rambo", false); }