public HostsController(IHostManagementService hostManagementService, IHostSearchManagementService hostSearchManagementService, IPersonManagementService personManagementService, IAuthenticationProvider authenticationProvider) { Check.Require(hostManagementService != null, "hostManagementService may not be null"); this._hostManagementService = hostManagementService; _hostSearchManagementService = hostSearchManagementService; _personManagementService = personManagementService; _authenticationProvider = authenticationProvider; }
public void SetUp() { ServiceLocatorInitializer.Init(); hostManagementService = MockRepository.GenerateMock<IHostManagementService>(); hostSearchManagementService = MockRepository.GenerateMock<IHostSearchManagementService>(); _personManagementService = MockRepository.GenerateMock<IPersonManagementService>(); _authenticationProvider = MockRepository.GenerateMock<IAuthenticationProvider>(); hostsController = new HostsController(hostManagementService, hostSearchManagementService, _personManagementService, _authenticationProvider); }