public void Initialize()
        {
            var authentication = MockRepository.GenerateMock<IAuthenticationService>();

            authentication.Stub(x => x.Identity).Return(new FakeUserIdentity());

            this.UserBanService = new UserBanService(
                authentication,
                MockRepository.GenerateMock<IUserService>(),
                new FakeUserBanRepository()
            );
        }
Beispiel #2
0
 protected T CreateTestControllerWith <T>(IUserBanService userBanService = null)
     where T : ApiController, new()
 {
     userBanService = useOrDefault <IUserBanService>(userBanService, _userBanService);
     return(new UserBanController(userBanService) as T);
 }
Beispiel #3
0
 public void SetUp()
 {
     _userBanService = GetInst <IUserBanService>();
     base.Setup();
 }
Beispiel #4
0
 public BanController(IUserBanService userBanService)
 {
     this.UserBanService = userBanService;
 }