Ejemplo n.º 1
0
        public void Test_AreaControlSet()
        {
            var argument = new AreaControlSet(true, 1000, 999, 10, 99, 8);

            var result = SimpleBinarizableInstanceTester.TestClassEx <AreaControlSet>(argument, "Custom AreaControlSet not same after round trip serialisation");

            argument.PixelXWorldSize.Should().Be(result.member.PixelXWorldSize, "YPixelWorldSize are not equal");
        }
Ejemplo n.º 2
0
 public void Test_CellSpatialFilter_OverrideSpatialCellRestriction()
 {
     SimpleBinarizableInstanceTester.TestClassEx <CellSpatialFilter>(new CellSpatialFilter
     {
         OverrideSpatialCellRestriction = new BoundingIntegerExtent2D(1, 2, 3, 4)
     },
                                                                     "Cell spatial filter (OverrideSpatialCellRestriction) not the same after round trip serialisation");
 }
Ejemplo n.º 3
0
 public void Test_CellSpatialFilter_CoordsAreGrid()
 {
     SimpleBinarizableInstanceTester.TestClassEx <CellSpatialFilter>(new CellSpatialFilter
     {
         CoordsAreGrid = true
     },
                                                                     "Cell spatial filter (CoordsAreGrid) not the same after round trip serialisation");
 }
Ejemplo n.º 4
0
 public void Test_CellSpatialFilter_IsSpatial()
 {
     SimpleBinarizableInstanceTester.TestClassEx <CellSpatialFilter>(new CellSpatialFilter
     {
         IsSpatial = true,
         Fence     = new Fence(0, 0, 10, 10)
     },
                                                                     "Cell spatial filter (IsSpatial) not the same after round trip serialisation");
 }
Ejemplo n.º 5
0
 public void Test_CellSpatialFilter_IsDesignMask()
 {
     SimpleBinarizableInstanceTester.TestClassEx <CellSpatialFilter>(new CellSpatialFilter
     {
         IsDesignMask = true,
         SurfaceDesignMaskDesignUid = Guid.NewGuid()
     },
                                                                     "Cell spatial filter (is IsDesignMask) not the same after round trip serialisation");
 }
Ejemplo n.º 6
0
 public void Test_CellSpatialFilter_IsPositional()
 {
     SimpleBinarizableInstanceTester.TestClassEx <CellSpatialFilter>(new CellSpatialFilter
     {
         PositionX      = 10,
         PositionY      = 11,
         PositionRadius = 123,
         IsPositional   = true
     },
                                                                     "Cell spatial filter (IsPositional) not the same after round trip serialisation");
 }
Ejemplo n.º 7
0
 public void Test_CellSpatialFilter_IsAlignmentFence()
 {
     SimpleBinarizableInstanceTester.TestClassEx <CellSpatialFilter>(new CellSpatialFilter
     {
         IsAlignmentMask = true,
         StartStation    = 0.0,
         EndStation      = 123.0,
         LeftOffset      = 5,
         RightOffset     = 7.5,
         AlignmentFence  = new Fence(0, 0, 10, 10),
         AlignmentDesignMaskDesignUID = Guid.NewGuid()
     },
                                                                     "Cell spatial filter (IsAlignmentFence) not the same after round trip serialisation");
 }
Ejemplo n.º 8
0
        public void ToFromBinary_FilterSet_FencePoints2()
        {
            var fence = new Fence();

            fence.Points.Add(new FencePoint(1, 50));
            fence.Points.Add(new FencePoint(2, 51));
            fence.UpdateExtents();

            FilterSet filterSet = new FilterSet();

            filterSet.Filters = new ICombinedFilter[1];
            var cf =
                new CombinedFilter
                    (new CellPassAttributeFilter()
            {
            },
                    new CellSpatialFilter()
            {
                PositionX      = 34,
                PositionY      = 56,
                PositionRadius = 4,
                IsSquare       = false,
                CoordsAreGrid  = true
            }
                    );

            cf.SpatialFilter.Fence = fence;

            filterSet.Filters[0] = cf;

            var result = SimpleBinarizableInstanceTester.TestClassEx(filterSet,
                                                                     "FilterSet with one empty filter not same after round trip serialisation");

            filterSet.Filters.Length.Should().Be(1, "spatialFenceFilter count is wrong");
            filterSet.Filters[0].SpatialFilter.Fence.Points.Count
            .Should().Be(2, "spatialFenceYCoords count is wrong");
            filterSet.Filters[0].SpatialFilter.Fence[0].Y
            .Should().Be(result.member.Filters[0].SpatialFilter.Fence[0].Y,
                         "spatialFenceYCoords are not equal");
        }
Ejemplo n.º 9
0
 public void Test_CellSpatialFilter_Simple()
 {
     SimpleBinarizableInstanceTester.TestClassEx <CellSpatialFilter>();
 }
Ejemplo n.º 10
0
 public void Test_CellPassAttributeFilter_Simple()
 {
     SimpleBinarizableInstanceTester.TestClassEx <CellPassAttributeFilter>();
 }
Ejemplo n.º 11
0
 public void ToFromBinary_CombinedFilter_Simple()
 {
     SimpleBinarizableInstanceTester.TestClassEx <CombinedFilter>("Empty CombinedFilter not same after round trip serialisation");
 }
Ejemplo n.º 12
0
 public void Test_AreaControlSet_Simple()
 {
     SimpleBinarizableInstanceTester.TestClassEx <AreaControlSet>("Empty AreaControlSet not same after round trip serialisation");
 }
Ejemplo n.º 13
0
 public void ToFromBinary_FilterSet_TwoFilters()
 {
     SimpleBinarizableInstanceTester.TestClassEx <FilterSet>(new FilterSet(new CombinedFilter(), new CombinedFilter()),
                                                             "FilterSet with one empty filter not same after round trip serialisation");
 }
Ejemplo n.º 14
0
 public void ToFromBinary_FilterSet_Simple()
 {
     SimpleBinarizableInstanceTester.TestClassEx <FilterSet>("Empty FilterSet not same after round trip serialisation");
 }