public void TestItAddsRunwayCentrelines() { RunwayCentreline centreline = RunwayCentrelineFactory.Make(); collection.Add(centreline); Assert.Equal(centreline, collection.RunwayCentrelines[0]); }
public void TestItAddsCentrelineData() { RunParserOnLines(new List <string>() { "N050.57.00.000 W001.21.24.490 N051.57.00.000 W002.21.24.490 ;comment" }); Assert.Single(sectorElementCollection.RunwayCentrelines); RunwayCentreline firstResult = sectorElementCollection.RunwayCentrelines[0]; Assert.Equal( new Coordinate("N050.57.00.000", "W001.21.24.490"), firstResult.CentrelineSegment.FirstCoordinate ); Assert.Equal( new Coordinate("N051.57.00.000", "W002.21.24.490"), firstResult.CentrelineSegment.SecondCoordinate ); AssertExpectedMetadata(firstResult); // The fixed colour centreline should have the same base segment as the main one Assert.Single(sectorElementCollection.FixedColourRunwayCentrelines); RunwayCentreline secondResult = sectorElementCollection.FixedColourRunwayCentrelines[0]; Assert.IsType <FixedColourRunwayCentreline>(secondResult); Assert.Same(firstResult.CentrelineSegment, secondResult.CentrelineSegment); AssertExpectedMetadata(secondResult); }
public void TestItReturnsElementsInOrder() { OutputGroup group1 = new("1"); OutputGroup group2 = new("2"); outputGroups.AddGroupWithFiles(group1, new List <string> { "foo.txt" }); outputGroups.AddGroupWithFiles(group2, new List <string> { "goo.txt" }); Geo first = GeoFactory.Make(definition: DefinitionFactory.Make("foo.txt")); Geo second = GeoFactory.Make(definition: DefinitionFactory.Make("goo.txt")); Geo third = GeoFactory.Make(definition: DefinitionFactory.Make("foo.txt")); RunwayCentreline fourth = RunwayCentrelineFactory.Make(); FixedColourRunwayCentreline fifth = FixedColourRunwayCentrelineFactory.Make(); sectorElements.Add(first); sectorElements.Add(second); sectorElements.Add(third); sectorElements.Add(fourth); sectorElements.Add(fifth); IEnumerable <ICompilableElementProvider> expected = new List <ICompilableElementProvider>() { first, third, second, fifth, fourth }; AssertCollectedItems(expected); }
public RunwayCentrelineTest() { segment = RunwayCentrelineSegmentFactory.Make(); centreline = new RunwayCentreline( segment, DefinitionFactory.Make(), DocblockFactory.Make(), CommentFactory.Make() ); }