Exemplo n.º 1
0
        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
        }
Exemplo n.º 2
0
        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);
        }