コード例 #1
0
        private void CheckResponseContainsNullValues(ProgressiveVolumesResponse response)
        {
            response.Should().NotBeNull();

            if (response.Volumes == null)
            {
                return;
            }

            foreach (var volume in response.Volumes)
            {
                volume.Volume.BoundingExtentGrid.Should().BeEquivalentTo(BoundingWorldExtent3D.Null());
                volume.Volume.BoundingExtentLLH.Should().BeEquivalentTo(BoundingWorldExtent3D.Null());
            }
        }
コード例 #2
0
        private void CheckDefaultFilterToFilterSingleTAGFileResponse(ProgressiveVolumesResponse response)
        {
            //Was, response = {Cut:1.00113831634521, Fill:2.48526947021484, Cut Area:117.5652, FillArea: 202.9936, Total Area:353.0424, BoundingGrid:MinX: 537669.2, MaxX:537676.34, MinY:5427391.44, MaxY:5427514.52, MinZ: 1E+308, MaxZ:1E+308, BoundingLLH:MinX: 1E+308, MaxX:1E+308, MinY:1...
            // const double EPSILON = 0.000001;
            response.Should().NotBeNull();
            response.ResultStatus.Should().Be(RequestErrorStatus.OK);

            response.Volumes.Should().NotBeNull();

            // todo: Complete this

            /*      response.BoundingExtentGrid.MinX.Should().BeApproximately(537669.2, EPSILON);
             *    response.BoundingExtentGrid.MinY.Should().BeApproximately(5427391.44, EPSILON);
             *    response.BoundingExtentGrid.MaxX.Should().BeApproximately(537676.34, EPSILON);
             *    response.BoundingExtentGrid.MaxY.Should().BeApproximately(5427514.52, EPSILON);
             *    response.BoundingExtentGrid.MinZ.Should().Be(Consts.NullDouble);
             *    response.BoundingExtentGrid.MaxZ.Should().Be(Consts.NullDouble);*/
        }
コード例 #3
0
        private void CheckDefaultSingleCellAtOriginResponse(ProgressiveVolumesResponse response)
        {
            // const double EPSILON = 0.000001;

            response.Should().NotBeNull();
            response.ResultStatus.Should().Be(RequestErrorStatus.OK);

            // todo: Complete this

            /*
             *    response.BoundingExtentGrid.MinX.Should().BeApproximately(0, EPSILON);
             *    response.BoundingExtentGrid.MinY.Should().BeApproximately(0, EPSILON);
             *    response.BoundingExtentGrid.MaxX.Should().BeApproximately(SubGridTreeConsts.DefaultCellSize, EPSILON);
             *    response.BoundingExtentGrid.MaxY.Should().BeApproximately(SubGridTreeConsts.DefaultCellSize, EPSILON);
             *    response.BoundingExtentGrid.MinZ.Should().Be(Consts.NullDouble);
             *    response.BoundingExtentGrid.MaxZ.Should().Be(Consts.NullDouble);
             */
        }
コード例 #4
0
        public void AggregateWith()
        {
            var date = DateTime.UtcNow;

            var response1 = new ProgressiveVolumesResponse
            {
                ResultStatus = RequestErrorStatus.OK,
                Volumes      = new[]
                {
                    new ProgressiveVolumeResponseItem
                    {
                        Date   = date,
                        Volume = new SimpleVolumesResponse()
                    }
                }
            };
            var response2 = new ProgressiveVolumesResponse
            {
                ResultStatus = RequestErrorStatus.OK,
                Volumes      = new[]
                {
                    new ProgressiveVolumeResponseItem
                    {
                        Date   = date,
                        Volume = new SimpleVolumesResponse
                        {
                            Cut  = 10.0,
                            Fill = 20.0,
                            BoundingExtentGrid = new TRex.Geometry.BoundingWorldExtent3D(1.0, 2.0, 3.0, 4.0, 5.0, 6.0),
                            CutArea            = 30.0,
                            FillArea           = 40.0,
                            TotalCoverageArea  = 100.0
                        }
                    }
                }
            };

            response1.AggregateWith(response2);

            response2.Should().BeEquivalentTo(response1);
        }