public void TestItReturnsElementsInOrder() { SidStar first = SidStarFactory.Make(true, "EGKK", identifier: "LAM1X"); SidStar second = SidStarFactory.Make(true, "EGKK", identifier: "ADMAG2X"); SidStar third = SidStarFactory.Make(true, "EGKK", identifier: "ADMAG1X"); SidStar fourth = SidStarFactory.Make(true, "EGCC", identifier: "LISTO1S"); SidStar fifth = SidStarFactory.Make(false, "EGCC", identifier: "SANBA1R"); SidStar sixth = SidStarFactory.Make(false, "EGCC", identifier: "LISTO1S"); sectorElements.Add(first); sectorElements.Add(second); sectorElements.Add(third); sectorElements.Add(fourth); sectorElements.Add(fifth); sectorElements.Add(sixth); IEnumerable <ICompilableElementProvider> expected = new List <ICompilableElementProvider>() { fourth, third, second, first, sixth, fifth }; AssertCollectedItems(expected); }
public void TestItAddsSidStars() { SidStar sidStar = SidStarFactory.Make(); collection.Add(sidStar); Assert.Equal(sidStar, collection.SidStars[0]); }
public AllSidsMustBeUniqueTest() { first = SidStarFactory.Make(true, "EGKK", "26L", "ADMAG2X", new List <string>()); second = SidStarFactory.Make(false, "EGKK", "26L", "ADMAG2X", new List <string>()); third = SidStarFactory.Make(true, "EGKK", "26L", "ADMAG2X", new List <string>()); fourth = SidStarFactory.Make(true, "EGKK", "26L", "ADMAG2X", new List <string> { "a" }); }
public AllSidsMustHaveAValidAirportTest() { sid1 = SidStarFactory.Make(airport: "EGKK"); sid2 = SidStarFactory.Make(airport: "EGCC"); sid3 = SidStarFactory.Make(airport: "EGBB"); sectorElements.Add(AirportFactory.Make("EGKK")); sectorElements.Add(AirportFactory.Make("EGLL")); sectorElements.Add(AirportFactory.Make("EGCC")); }
public AllSidsMustHaveAValidRouteTest() { first = SidStarFactory.Make(route: new List <string>(new[] { "testfix", "testvor", "testndb", "testairport" })); second = SidStarFactory.Make(route: new List <string>(new[] { "nottestfix", "testvor", "testndb", "testairport" })); sectorElements.Add(FixFactory.Make("testfix")); sectorElements.Add(VorFactory.Make("testvor")); sectorElements.Add(NdbFactory.Make("testndb")); sectorElements.Add(AirportFactory.Make("testairport")); }
public void TestItAddsSidStarWithNoRoute() { RunParserOnLines(new List <string>(new[] { "SID:EGKK:26L:ADMAG2X: ;comment" })); SidStar result = sectorElementCollection.SidStars[0]; Assert.Equal("SID", result.Type); Assert.Equal("EGKK", result.Airport); Assert.Equal("26L", result.Runway); Assert.Equal("ADMAG2X", result.Identifier); Assert.Empty(result.Route); AssertExpectedMetadata(result); }
public SidStarTest() { this.sidStar = new SidStar( "SID", "EGKK", "26L", "ADMAG2X", new List <string>(new[] { "FIX1", "FIX2", "FIX3" }), DefinitionFactory.Make(), DocblockFactory.Make(), CommentFactory.Make() ); }
private string GetKey(SidStar sidStar) { return(sidStar.Type + ":" + sidStar.Airport + ":" + sidStar.Runway + ":" + sidStar.Identifier + ":" + String.Join(" ", sidStar.Route)); }