Пример #1
0
 public UsersController(IUserSynchronizer userSynchronizer, UserSettingsMapper userSettingsMapper, UserService userService, UserRolesService userRolesService, RoleService roleService)
 {
     _userSynchronizer   = userSynchronizer;
     _userSettingsMapper = userSettingsMapper;
     _userService        = userService;
     _userRolesService   = userRolesService;
     _roleService        = roleService;
 }
Пример #2
0
        public void UserRolesServiceTest_FindUsersByRole_WhenWriter_AlwaysReturnsNully()
        {
            var svc = new UserRolesService();

            var actual = svc.FindUsersByRole("writer");

            Assert.Null(actual); // No writers allowed
        }
Пример #3
0
        public void UserRolesServiceTest_FindUsersByRole_Always_Iterable()
        {
            var svc = new UserRolesService();

            var actual = svc.FindUsersByRole("writer");

            // oops, I cant iterate over null!
            Assert.IsAssignableFrom <IEnumerable <string> >(actual);
        }
Пример #4
0
 public UserRolesController(UserRolesService _userRolesServices)
 {
     userRolesServices = _userRolesServices;
 }
Пример #5
0
 public UserSettingsMapper(UserRolesService userRolesService, UserPermissionsService userPermissionsService)
 {
     this._userRolesService       = userRolesService;
     this._userPermissionsService = userPermissionsService;
 }