示例#1
0
        public void TestItFailsOnBadNdb()
        {
            List <RouteSegment> segments = new()
            {
                RouteSegmentFactory.MakeDoublePoint("testvor", "testndb"),
                RouteSegmentFactory.MakeDoublePoint("testndb", "testairport"),
                RouteSegmentFactory.MakePointCoordinate("testairport"),
                RouteSegmentFactory.MakeCoordinatePoint("testfix"),
            };

            SidStarRoute route = new(
                SidStarType.STAR,
                "EGKK TEST",
                RouteSegmentFactory.MakeDoublePoint("testfix", "testvor"),
                segments,
                DefinitionFactory.Make(),
                DocblockFactory.Make(),
                CommentFactory.Make()
                );

            sectorElements.Add(route);
            sectorElements.Ndbs.Clear();

            AssertValidationErrors(2);
        }
示例#2
0
        public void TestItPassesOnValidRoute()
        {
            sectorElements.Add(
                SidStarRouteFactory.Make(
                    segments: new List <RouteSegment>
            {
                RouteSegmentFactory.MakeDoublePoint("testfix", "testvor"),
                RouteSegmentFactory.MakeDoublePoint("testvor", "testndb"),
                RouteSegmentFactory.MakeDoublePoint("testndb", "testairport"),
                RouteSegmentFactory.MakePointCoordinate("testairport", new Coordinate("abc", "def")),
                RouteSegmentFactory.MakeCoordinatePoint("testvor", new Coordinate("abc", "def")),
            }
                    )
                );

            AssertNoValidationErrors();
        }
示例#3
0
        public void TestItFailsOnBadFix()
        {
            sectorElements.Add(
                SidStarRouteFactory.Make(
                    segments: new List <RouteSegment>
            {
                RouteSegmentFactory.MakeDoublePoint("testfix", "testvor"),
                RouteSegmentFactory.MakeDoublePoint("testvor", "testndb"),
                RouteSegmentFactory.MakeDoublePoint("testndb", "testairport"),
                RouteSegmentFactory.MakePointCoordinate("testairport", new Coordinate("abc", "def")),
                RouteSegmentFactory.MakeCoordinatePoint("testfix", new Coordinate("abc", "def")),
            }
                    )
                );

            sectorElements.Fixes.Clear();
            AssertValidationErrors(2);
        }