public void TestItAddsLowAirways()
        {
            AirwaySegment airway = AirwaySegmentFactory.Make();

            collection.Add(airway);

            Assert.Equal(airway, collection.LowAirways[0]);
        }
        public void TestItAddsHighAirways()
        {
            AirwaySegment airway = AirwaySegmentFactory.Make(AirwayType.HIGH);

            collection.Add(airway);

            Assert.Equal(airway, collection.HighAirways[0]);
        }
Ejemplo n.º 3
0
 public AirwaySegmentTest()
 {
     this.airway = new AirwaySegment(
         "UN864",
         AirwayType.HIGH,
         new Point("ABCDE"),
         new Point("FGHIJ"),
         DefinitionFactory.Make(),
         DocblockFactory.Make(),
         CommentFactory.Make()
         );
 }
Ejemplo n.º 4
0
        public void TestItAddsAirwayDataWithIdentifiers()
        {
            RunParserOnLines(new List <string>(new[] { "DIKAS DIKAS BHD BHD;comment" }));

            AirwaySegment result = sectorElementCollection.LowAirways[0];

            Assert.Equal("TEST", result.Identifier);
            Assert.Equal(AirwayType.LOW, result.Type);
            Assert.Equal(new Point("DIKAS"), result.StartPoint);
            Assert.Equal(new Point("BHD"), result.EndPoint);
            AssertExpectedMetadata(result);
        }
Ejemplo n.º 5
0
        public void TestItAddsAirwayData()
        {
            RunParserOnLines(new List <string>(new[] { "N050.57.00.001 W001.21.24.490 N050.57.00.002 W001.21.24.490;comment" }));

            AirwaySegment result = sectorElementCollection.LowAirways[0];

            Assert.Equal("TEST", result.Identifier);
            Assert.Equal(AirwayType.LOW, result.Type);
            Assert.Equal(new Point(new Coordinate("N050.57.00.001", "W001.21.24.490")), result.StartPoint);
            Assert.Equal(new Point(new Coordinate("N050.57.00.002", "W001.21.24.490")), result.EndPoint);
            AssertExpectedMetadata(result);
        }
Ejemplo n.º 6
0
        public void TestItReturnsElementsInOrder()
        {
            AirwaySegment first  = AirwaySegmentFactory.Make(identifier: "N864");
            AirwaySegment second = AirwaySegmentFactory.Make(identifier: "N862");
            AirwaySegment third  = AirwaySegmentFactory.Make(identifier: "L9");

            sectorElements.Add(first);
            sectorElements.Add(second);
            sectorElements.Add(third);

            IEnumerable <ICompilableElementProvider> expected = new List <ICompilableElementProvider>()
            {
                third,
                second,
                first
            };

            AssertCollectedItems(expected);
        }