public void ViewAgentGet_NullViewDS_ExceptionThrown() { // arrange viewDS = null; configAgent .Stub(x => x.GetBoolean(Arg.Is(CCConfigurationPaths.IndexingPath), Arg <bool> .Is.Anything)) .Return(false); positioner.GridInstalled = true; // act gridIndexingController.EvaluateGridIndexing(); // assert // throw }
public void GridIndexTestInitialize() { // stub out a view agent and view DS viewAgent = MockRepository.GenerateStub <IViewAgent>(); viewDS = new CCViewDS(); // when the controller calls viewAgent.get return this DS viewAgent.Stub(x => x.Get()).Return(viewDS); // stub out a config agent configAgent = MockRepository.GenerateStub <IConfigurationAgent>(); // stub out a positioner positioner = MockRepository.GenerateStub <IPositioner>(); // create the controller gridIndexingController = new GridIndexController(viewAgent, configAgent, positioner); }