예제 #1
0
        public void Then_CustomAuthorizationProviderDataHasAppropriateAttributes()
        {
            var customAuthZProvider = AuthorizationProviders.OfType <CustomAuthorizationProviderData>().First();

            Assert.AreEqual(attributes.Count, customAuthZProvider.Attributes.Count);
            foreach (string key in attributes)
            {
                Assert.AreEqual(attributes[key], customAuthZProvider.Attributes[key]);
            }
        }
예제 #2
0
        public void Then_CustomAuthorizationProviderDataHasAppropriateType()
        {
            var customAuthZProvider = AuthorizationProviders.OfType <CustomAuthorizationProviderData>().First();

            Assert.AreEqual(typeof(CustomAuthorizationProvider), customAuthZProvider.Type);
        }
예제 #3
0
        public void Then_CustomAuthorizationProviderDataHasAppropriateName()
        {
            var customAuthZProvider = AuthorizationProviders.OfType <CustomAuthorizationProviderData>().First();

            Assert.AreEqual("custom provider", customAuthZProvider.Name);
        }
예제 #4
0
 public void Then_CustomAuthorizationProviderDataIsAddedToSecurityConfiguration()
 {
     Assert.AreEqual(1, AuthorizationProviders.OfType <CustomAuthorizationProviderData>().Count());
 }