public void TestItPassesOnValidControllers() { sectorElements.Add( SectorFactory.Make( alternate: new List <SectorAlternateOwnerHierarchy> { SectorAlternateOwnerHierarchyFactory.Make(new List <string> { "LS", "LC" }), SectorAlternateOwnerHierarchyFactory.Make(new List <string> { "BBR" }), } ) ); sectorElements.Add( SectorFactory.Make( alternate: new List <SectorAlternateOwnerHierarchy> { SectorAlternateOwnerHierarchyFactory.Make(new List <string> { "LS", "LC" }), SectorAlternateOwnerHierarchyFactory.Make(new List <string> { "BBR", "LS" }), } ) ); AssertNoValidationErrors(); }
public void TestItFailsOnInvalidControllers(string first, string second, string third, string bad) { sectorElements.Add( SectorFactory.Make( alternate: new List <SectorAlternateOwnerHierarchy> { SectorAlternateOwnerHierarchyFactory.Make(new List <string> { first, second }), SectorAlternateOwnerHierarchyFactory.Make(new List <string> { second }), } ) ); sectorElements.Add( SectorFactory.Make( alternate: new List <SectorAlternateOwnerHierarchy> { SectorAlternateOwnerHierarchyFactory.Make(new List <string> { first, second }), SectorAlternateOwnerHierarchyFactory.Make(new List <string> { second, third, bad, first }), } ) ); AssertValidationErrors(); }
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 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() ) },