public void HasSetAllDependencies() { var commandExecutor = MockRepository.GenerateMock<ICommandExecutor>(); var locator = MockRepository.GenerateMock<IServiceLocator>(); locator .Stub(x => x.GetInstance<ICommandExecutor>()) .Return(commandExecutor); ServiceLocator.SetLocatorProvider(() => locator); var controller = new DummyCommandController(); HasSetAllDependenciesControllerHelper.AssertFieldsAreNotNull(controller); }
public void HasSetAllDependencies() { var commandExecutor = MockRepository.GenerateMock <ICommandExecutor>(); var locator = MockRepository.GenerateMock <IServiceLocator>(); locator .Stub(x => x.GetInstance <ICommandExecutor>()) .Return(commandExecutor); ServiceLocator.SetLocatorProvider(() => locator); var controller = new DummyCommandController(); HasSetAllDependenciesControllerHelper.AssertFieldsAreNotNull(controller); }