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 void TestItAddsGeo() { Geo geo = GeoFactory.Make(); collection.Add(geo); Assert.Equal(geo, collection.GeoElements[0]); }
public void TestItFailsOnInvalidColourIntegers() { sectorElements.Add(GeoFactory.Make( "123456789", new List <GeoSegment> { GeoSegmentFactory.Make(colour: "123456789"), } )); AssertValidationErrors(2); }
public void TestItFailsOnInvalidDefinedColours() { sectorElements.Add(GeoFactory.Make( "notcolour1", new List <GeoSegment> { GeoSegmentFactory.Make(colour: "notcolour1"), } )); AssertValidationErrors(2); }
public void TestItPassesOnValidDefinedColours() { sectorElements.Add(GeoFactory.Make( "colour1", new List <GeoSegment> { GeoSegmentFactory.Make(colour: "colour1"), } )); AssertNoValidationErrors(); }
public void TestItPassesOnValidColoursIntegers() { sectorElements.Add(GeoFactory.Make( "55", new List <GeoSegment> { GeoSegmentFactory.Make(colour: "42"), } )); AssertNoValidationErrors(); }
public void TestItFailsOnInvalidPoint() { sectorElements.Add(GeoFactory.Make( firstPoint: new Point("nottestndb"), secondPoint: new Point("testairport"), additionalSegments: new List <GeoSegment> { GeoSegmentFactory.Make(firstPoint: new Point("nottestvor"), secondPoint: new Point("testfix")), } )); sectorElements.Add(GeoFactory.Make( firstPoint: new Point("testndb"), secondPoint: new Point("nottestairport"), additionalSegments: new List <GeoSegment> { GeoSegmentFactory.Make(firstPoint: new Point("testvor"), secondPoint: new Point("nottestfix")), } )); AssertValidationErrors(4); }