Example #1
0
        public void CreateShouldReturnWithDependenciesInitialized()
        {
            var dependencies = AuthorizationDependencies.Create(new AuthorizationOptions());

            Assert.IsInstanceOfType(dependencies.LoggerFactory, typeof(DiagnosticsLoggerFactory));
            Assert.IsInstanceOfType(dependencies.PolicyProvider, typeof(DefaultAuthorizationPolicyProvider));
            Assert.IsInstanceOfType(dependencies.Service, typeof(DefaultAuthorizationService));
        }
Example #2
0
 public void CreateShouldThrowWhenOptionsIsNull()
 {
     AuthorizationDependencies.Create(null);
 }
Example #3
0
        public void CreateShouldNotReturnNull()
        {
            var dependencies = AuthorizationDependencies.Create(new AuthorizationOptions());

            Assert.IsNotNull(dependencies, "dependencies != null");
        }
Example #4
0
 public void CreateShouldThrowWhenHandlersIsNull()
 {
     AuthorizationDependencies.Create(new AuthorizationOptions(), null);
 }