Ejemplo n.º 1
0
        public void Test_RequestAnalyser_EmptyExistenceMap_YieldsNoSubGrids()
        {
            var prodDataExistenceMap = new SubGridTreeSubGridExistenceBitMask();
            var PipeLine             = new SubGridPipelineProgressive <SubGridsRequestArgument, SubGridRequestsResponse>(null)
            {
                FilterSet            = new FilterSet(new CombinedFilter()),
                ProdDataExistenceMap = prodDataExistenceMap,
                OverallExistenceMap  = prodDataExistenceMap
            };

            var analyser = new RequestAnalyser(PipeLine, BoundingWorldExtent3D.Full());

            Assert.Equal(0, analyser.CountOfSubGridsThatWillBeSubmitted());
        }
Ejemplo n.º 2
0
        public void Test_RequestAnalyser_WithPipelineAndNoFilters_Execute_Fails()
        {
            var pipeLine = new SubGridPipelineProgressive <SubGridsRequestArgument, SubGridRequestsResponse>(null)
            {
                FilterSet = null
            };

            var analyser = new RequestAnalyser
            {
                Pipeline = pipeLine
            };

            Action act = () => analyser.Execute();

            act.Should().Throw <ArgumentException>().WithMessage("*No filters in pipeline*");
        }
Ejemplo n.º 3
0
        public void Test_RequestAnalyser_WithPipelineAndNoProductionDataExistanceMap_Execute_Fails()
        {
            var pipeLine = new SubGridPipelineProgressive <SubGridsRequestArgument, SubGridRequestsResponse>(null)
            {
                FilterSet            = new FilterSet(new CombinedFilter()),
                ProdDataExistenceMap = null
            };

            var analyser = new RequestAnalyser
            {
                Pipeline = pipeLine
            };

            Action act = () => analyser.Execute();

            act.Should().Throw <ArgumentException>().WithMessage("*Production Data Existence Map should have been specified*");
        }