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() ); }
protected T CreateTestControllerWith <T>(IUserBanService userBanService = null) where T : ApiController, new() { userBanService = useOrDefault <IUserBanService>(userBanService, _userBanService); return(new UserBanController(userBanService) as T); }
public void SetUp() { _userBanService = GetInst <IUserBanService>(); base.Setup(); }
public BanController(IUserBanService userBanService) { this.UserBanService = userBanService; }