Example #1
0
 public DayOfSesshinAccountantAuthorizationServiceTest()
 {
     _authorizationService = MockAuthorizationService.BuildAuthorizationService(services =>
     {
         services.AddScoped <IAuthorizationHandler, AccountantAuthorizationHandler>();
     });
     _user = new TestClaimsPrincipal();
 }
 public StockAdminAuthorizationServiceTest()
 {
     _authorizationService = MockAuthorizationService.BuildAuthorizationService(services =>
     {
         services.AddScoped <IAuthorizationHandler, AdminAuthorizationHandler>();
     });
     _user = new TestClaimsPrincipal();
 }
        public SesshinChefAuthorizationServiceTest()
        {
            _userManager    = new MockUserManager();
            _mealService    = new MockMealService();
            _sesshinService = new MockSesshinService();

            _authorizationService = MockAuthorizationService.BuildAuthorizationService(services =>
            {
                services.AddScoped <IAuthorizationHandler>(sp => new ChefAuthorizationHandler(_userManager.Object, _mealService.Object, _sesshinService.Object));
            });
            _user = new TestClaimsPrincipal();
        }