Ejemplo n.º 1
0
        public void LoginByNameAndPersistentDoesNotThrowIfNoAnyProfiderSet(
            string userName,
            bool persistent)
        {
            var sut = new SwitchingAuthenticationProvider();

            sut.Login(userName, persistent);
        }
Ejemplo n.º 2
0
 public void LoginCallsSwithcedProviderIfNotNull(
     AuthenticationProvider switchedProvider)
 {
     using (new Switcher <AuthenticationProvider>(switchedProvider))
     {
         var sut = new SwitchingAuthenticationProvider();
         sut.Login(this.user);
         switchedProvider.Received().Login(this.user);
     }
 }
Ejemplo n.º 3
0
        public void LoginCallsDefaultProviderIfNotSwitched(
            AuthenticationProvider defaultProvider)
        {
            var sut = new SwitchingAuthenticationProvider
            {
                DefaultProvider = defaultProvider
            };

            sut.Login(this.user);
            defaultProvider.Received().Login(this.user);
        }
Ejemplo n.º 4
0
 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);
     }
 }
Ejemplo n.º 5
0
        public void LoginByNameAndPersistentCallsDefaultProviderIfNotSwitched(
            AuthenticationProvider defaultProvider,
            string userName,
            bool persistent)
        {
            var sut = new SwitchingAuthenticationProvider
            {
                DefaultProvider = defaultProvider
            };

            sut.Login(userName, persistent);
            defaultProvider.Received().Login(userName, persistent);
        }
Ejemplo n.º 6
0
        public void LoginDoesNotThrowIfNoAnyProfiderSet()
        {
            var sut = new SwitchingAuthenticationProvider();

            sut.Login(this.user);
        }