public SectorTest() { this.altOwners = SectorAlternateOwnerHierarchyFactory.MakeList(); this.guests = SectorGuestFactory.MakeList(); this.active = SectorActiveFactory.MakeList(); this.owners = SectorOwnerHierarchyFactory.Make(); this.borders = SectorBorderFactory.MakeList(); this.departureAirports = SectorDepartureAirportsFactory.MakeList(); this.arrivalAirports = SectorArrivalAirportsFactory.MakeList(); this.model = new Sector( "COOL", 5000, 66000, this.owners, this.altOwners, this.active, this.guests, this.borders, this.arrivalAirports, this.departureAirports, DefinitionFactory.Make(), DocblockFactory.Make(), CommentFactory.Make() ); }
public void TestItFailsOnInvalid(string first, string second, string third, int timesCalled) { sectorElements.Add( SectorFactory.Make( active: new List <SectorActive> { SectorActiveFactory.Make(first), SectorActiveFactory.Make(third) } ) ); sectorElements.Add( SectorFactory.Make( active: new List <SectorActive> { SectorActiveFactory.Make(second), SectorActiveFactory.Make(third) } ) ); AssertValidationErrors(timesCalled); }
public void TestItPassesOnAllValid(string first, string second, string third) { sectorElements.Add( SectorFactory.Make( active: new List <SectorActive> { SectorActiveFactory.Make(first), SectorActiveFactory.Make(third) } ) ); sectorElements.Add( SectorFactory.Make( active: new List <SectorActive> { SectorActiveFactory.Make(second), SectorActiveFactory.Make(third) } ) ); AssertNoValidationErrors(); }
public void TestItPassesOnValidBorders() { sectorElements.Add( new Sector( "COOL1", 5000, 66000, SectorOwnerHierarchyFactory.Make(), SectorAlternateOwnerHierarchyFactory.MakeList(2), SectorActiveFactory.MakeList(), SectorGuestFactory.MakeList(), new List <SectorBorder> { new( new List <string> { "ONE", "TWO", }, DefinitionFactory.Make(), DocblockFactory.Make(), CommentFactory.Make() ) },
public void TestItFailsOnInvalid(string firstAirport, string firstRunway, string secondAirport, string secondRunway, int failTimes) { sectorElements.Add( SectorFactory.Make( active: new List <SectorActive> { SectorActiveFactory.Make(firstAirport, firstRunway), SectorActiveFactory.Make(secondAirport, secondRunway), } ) ); sectorElements.Add( SectorFactory.Make( active: new List <SectorActive> { SectorActiveFactory.Make(firstAirport, firstRunway), SectorActiveFactory.Make(secondAirport, secondRunway), } ) ); AssertValidationErrors(failTimes); }
public void TestItPassesOnAllValid(string firstAirport, string firstRunway, string secondAirport, string secondRunway) { sectorElements.Add( SectorFactory.Make( active: new List <SectorActive> { SectorActiveFactory.Make(firstAirport, firstRunway), SectorActiveFactory.Make(secondAirport, secondRunway), } ) ); sectorElements.Add( SectorFactory.Make( active: new List <SectorActive> { SectorActiveFactory.Make(firstAirport, firstRunway), SectorActiveFactory.Make(secondAirport, secondRunway), } ) ); AssertNoValidationErrors(); }