public void TestItPassesOnAllValid(string firstAirport, string firstRunway, string secondAirport, string secondRunway) { sectorElements.Add( GroundNetworkFactory.Make( firstAirport, new List <GroundNetworkRunwayExit> { GroundNetworkRunwayExitFactory.Make(firstRunway), GroundNetworkRunwayExitFactory.Make(firstRunway) } ) ); sectorElements.Add( GroundNetworkFactory.Make( secondAirport, new List <GroundNetworkRunwayExit> { GroundNetworkRunwayExitFactory.Make(secondRunway), GroundNetworkRunwayExitFactory.Make(secondRunway) } ) ); AssertNoValidationErrors(); }
public void TestItFailsOnInvalid(string firstAirport, string firstRunway, string secondAirport, string secondRunway, int failTimes) { sectorElements.Add( GroundNetworkFactory.Make( firstAirport, new List <GroundNetworkRunwayExit> { GroundNetworkRunwayExitFactory.Make(firstRunway), GroundNetworkRunwayExitFactory.Make(firstRunway) } ) ); sectorElements.Add( GroundNetworkFactory.Make( secondAirport, new List <GroundNetworkRunwayExit> { GroundNetworkRunwayExitFactory.Make(secondRunway), GroundNetworkRunwayExitFactory.Make(secondRunway) } ) ); AssertValidationErrors(failTimes); }
public void TestItAddsGroundNetworks() { GroundNetwork network = GroundNetworkFactory.Make(); collection.Add(network); Assert.Single(collection.GroundNetworks); Assert.Equal(network, collection.GroundNetworks[0]); }
public void TestItReturnsElementsInOrder() { GroundNetwork first = GroundNetworkFactory.Make("EGKK"); GroundNetwork second = GroundNetworkFactory.Make("EGGD"); GroundNetwork third = GroundNetworkFactory.Make("EGAC"); sectorElements.Add(first); sectorElements.Add(second); sectorElements.Add(third); IEnumerable <ICompilableElementProvider> expected = new List <ICompilableElementProvider>() { third, second, first }; AssertCollectedItems(expected); }