Пример #1
0
        public void GetAuthorizationProviderByNameTest()
        {
            AuthorizationProviderFactory factory  = new AuthorizationProviderFactory(GetConfigurationSource());
            IAuthorizationProvider       provider = factory.Create("provider1");

            Assert.IsNotNull(provider);
            MockAuthorizationProvider mockProvider = provider as MockAuthorizationProvider;

            Assert.IsNotNull(mockProvider);
        }
Пример #2
0
        public void GetDefaultAuthorizationProviderTest()
        {
            AuthorizationProviderFactory factory  = new AuthorizationProviderFactory(GetConfigurationSource());
            IAuthorizationProvider       provider = factory.CreateDefault();

            Assert.IsNotNull(provider);
            MockAuthorizationProvider mockProvider = provider as MockAuthorizationProvider;

            Assert.IsNotNull(mockProvider);
            Assert.IsTrue(mockProvider.Initialized);
        }