[InlineData("TAXI:A1:15:: ;comment", "A1", 15, null, null)] // Gate and usage flag empty public void TestItAddsTaxiways( string taxiwayLine, string expectedName, int expectedMaximumSpeed, int?expectedUsageFlag, string expectedGateName ) { RunParserOnLines( new List <string> { taxiwayLine, "COORD:N050.57.00.000:W001.21.24.490 ;comment1", "COORD:N050.57.00.000:W001.21.24.491 ;comment2" } ); Assert.Single(sectorElementCollection.GroundNetworks); Assert.Equal("TESTFOLDER", sectorElementCollection.GroundNetworks[0].Airport); Assert.Single(sectorElementCollection.GroundNetworks[0].Taxiways); GroundNetworkTaxiway taxiway = sectorElementCollection.GroundNetworks[0].Taxiways[0]; Assert.Equal(expectedName, taxiway.Name); Assert.Equal(expectedMaximumSpeed, taxiway.MaximumSpeed); Assert.Equal(expectedUsageFlag, taxiway.UsageFlag); Assert.Equal(expectedGateName, taxiway.GateName); Assert.Equal(2, taxiway.Coordinates.Count); Assert.Equal(new Coordinate("N050.57.00.000", "W001.21.24.490"), taxiway.Coordinates[0].Coordinate); AssertExpectedMetadata(taxiway.Coordinates[0], 2, "comment1"); Assert.Equal(new Coordinate("N050.57.00.000", "W001.21.24.491"), taxiway.Coordinates[1].Coordinate); AssertExpectedMetadata(taxiway.Coordinates[1], 3, "comment2"); AssertExpectedMetadata(taxiway); }
public void TestItCompilesWithNulls() { var taxiway2 = new GroundNetworkTaxiway( "A", 15, null, null, coordinates, DefinitionFactory.Make(), DocblockFactory.Make(), CommentFactory.Make() ); Assert.Equal("TAXI:A:15::", taxiway2.GetCompileData(new SectorElementCollection())); }
public GroundNetworkTaxiwayTest() { coordinate1 = GroundNetworkCoordinateFactory.Make(new Coordinate("abc", "def")); coordinate2 = GroundNetworkCoordinateFactory.Make(new Coordinate("abc", "ghi")); coordinates = new List <GroundNetworkCoordinate> { coordinate1, coordinate2 }; taxiway = new GroundNetworkTaxiway( "A", 15, 1, "55L", coordinates, DefinitionFactory.Make(), DocblockFactory.Make(), CommentFactory.Make() ); }
public GroundNetworkTest() { taxiway1 = GroundNetworkTaxiwayFactory.Make(); taxiway2 = GroundNetworkTaxiwayFactory.Make(); taxiways = new List <GroundNetworkTaxiway> { taxiway1, taxiway2 }; exit1 = GroundNetworkRunwayExitFactory.Make(); exit2 = GroundNetworkRunwayExitFactory.Make(); exits = new List <GroundNetworkRunwayExit> { exit1, exit2 }; network = new GroundNetwork( "EGLL", taxiways, exits ); }