private static Faker <Sector> GetGenerator(
     string name = null,
     List <SectorActive> active = null,
     List <SectorAlternateOwnerHierarchy> alternate   = null,
     List <SectorArrivalAirports> arrivalAirports     = null,
     List <SectorDepartureAirports> departureAirports = null,
     List <SectorGuest> guests   = null,
     SectorOwnerHierarchy owners = null,
     Definition definition       = null
     )
 {
     return(new Faker <Sector>()
            .CustomInstantiator(
                f => new Sector(
                    name ?? f.Random.String2(5),
                    0,
                    66000,
                    owners ?? SectorOwnerHierarchyFactory.Make(),
                    alternate ?? SectorAlternateOwnerHierarchyFactory.MakeList(2),
                    active ?? SectorActiveFactory.MakeList(),
                    guests ?? SectorGuestFactory.MakeList(2),
                    SectorBorderFactory.MakeList(2),
                    arrivalAirports ?? SectorArrivalAirportsFactory.MakeList(),
                    departureAirports ?? SectorDepartureAirportsFactory.MakeList(),
                    definition ?? DefinitionFactory.Make(),
                    DocblockFactory.Make(),
                    CommentFactory.Make()
                    )
                ));
 }
示例#2
0
 public static CoordinationPoint MakeAirport(
     bool firCopx            = false,
     string departureAirport = null,
     string departureRunway  = null,
     string arrivalAirport   = null,
     string arrivalRunway    = null
     )
 {
     return(new Faker <CoordinationPoint>()
            .CustomInstantiator(
                _ => new CoordinationPoint(
                    firCopx,
                    departureAirport ?? AirportFactory.GetRandomDesignator(),
                    departureRunway ?? RunwayFactory.GetRandomDesignator(),
                    FixFactory.RandomIdentifier(),
                    arrivalAirport ?? AirportFactory.GetRandomDesignator(),
                    arrivalRunway ?? RunwayFactory.GetRandomDesignator(),
                    "AB",
                    "CD",
                    "6000",
                    null,
                    "TEST",
                    DefinitionFactory.Make(),
                    DocblockFactory.Make(),
                    CommentFactory.Make()
                    )
                ));
 }
示例#3
0
 public static CoordinationPoint Make(
     bool firCopx             = false,
     string coordinationPoint = null,
     string priorPoint        = null,
     string nextPoint         = null,
     string fromSector        = null,
     string toSector          = null,
     Definition definition    = null
     )
 {
     return(new Faker <CoordinationPoint>()
            .CustomInstantiator(
                _ => new CoordinationPoint(
                    firCopx,
                    priorPoint ?? FixFactory.RandomIdentifier(),
                    "",
                    coordinationPoint ?? FixFactory.RandomIdentifier(),
                    nextPoint ?? FixFactory.RandomIdentifier(),
                    "",
                    fromSector ?? "AB",
                    toSector ?? "CD",
                    "6000",
                    null,
                    "TEST",
                    definition ?? DefinitionFactory.Make(),
                    DocblockFactory.Make(),
                    CommentFactory.Make()
                    )
                ));
 }
 public static ControllerPosition Make(
     string identifier     = null,
     PositionOrder?order   = null,
     Definition definition = null
     )
 {
     return(new Faker <ControllerPosition>().CustomInstantiator(
                f => new ControllerPosition(
                    f.Random.ArrayElement(Callsigns),
                    "London Control",
                    "123.456",
                    identifier ?? f.Random.ArrayElement(Identifiers),
                    "L",
                    "L",
                    "L",
                    f.Random.ArrayElement(SquawksRangeStarts),
                    f.Random.ArrayElement(SquawksRangeEnds),
                    new List <Coordinate>()
     {
         CoordinateFactory.Make()
     },
                    order ?? PositionOrder.CONTROLLER_POSITION,
                    definition ?? DefinitionFactory.Make(),
                    DocblockFactory.Make(),
                    CommentFactory.Make()
                    )
                ));
 }
 public static Info Make(string airport = null)
 {
     return(new(
                new InfoName(
                    "Super Cool Sector",
                    DefinitionFactory.Make(),
                    DocblockFactory.Make(),
                    CommentFactory.Make()
                    ),
                new InfoCallsign(
                    "LON_CTR",
                    DefinitionFactory.Make(),
                    DocblockFactory.Make(),
                    CommentFactory.Make()
                    ),
                new InfoAirport(
                    airport ?? "EGLL",
                    DefinitionFactory.Make(),
                    DocblockFactory.Make(),
                    CommentFactory.Make()
                    ),
                new InfoLatitude(
                    "123",
                    DefinitionFactory.Make(),
                    DocblockFactory.Make(),
                    CommentFactory.Make()
                    ),
                new InfoLongitude(
                    "456",
                    DefinitionFactory.Make(),
                    DocblockFactory.Make(),
                    CommentFactory.Make()
                    ),
                new InfoMilesPerDegreeLatitude(
                    60,
                    DefinitionFactory.Make(),
                    DocblockFactory.Make(),
                    CommentFactory.Make()
                    ),
                new InfoMilesPerDegreeLongitude(
                    40.24,
                    DefinitionFactory.Make(),
                    DocblockFactory.Make(),
                    CommentFactory.Make()
                    ),
                new InfoMagneticVariation(
                    2.1,
                    DefinitionFactory.Make(),
                    DocblockFactory.Make(),
                    CommentFactory.Make()
                    ),
                new InfoScale(
                    1,
                    DefinitionFactory.Make(),
                    DocblockFactory.Make(),
                    CommentFactory.Make()
                    )
                ));
 }
 private static Faker <SectorOwnerHierarchy> GetGenerator(List <string> controllers = null)
 {
     return(new Faker <SectorOwnerHierarchy>()
            .CustomInstantiator(
                _ => new SectorOwnerHierarchy(
                    controllers ?? ControllerPositionFactory.GetIdentifierList(),
                    DefinitionFactory.Make(),
                    DocblockFactory.Make(),
                    CommentFactory.Make()
                    )
                ));
 }
示例#7
0
 public static FixedColourRunwayCentreline Make()
 {
     return(new Faker <FixedColourRunwayCentreline>()
            .CustomInstantiator(
                _ => new FixedColourRunwayCentreline(
                    RunwayCentrelineSegmentFactory.Make(),
                    DefinitionFactory.Make(),
                    DocblockFactory.Make(),
                    CommentFactory.Make()
                    )
                ));
 }
 public static Faker <RegionPoint> GetGenerator(string colour = null, Point point = null)
 {
     return(new Faker <RegionPoint>().CustomInstantiator(
                _ => new RegionPoint(
                    point ?? PointFactory.Make(),
                    DefinitionFactory.Make(),
                    DocblockFactory.Make(),
                    CommentFactory.Make(),
                    colour ?? "red"
                    )
                ));
 }
 private static Faker <SectorDepartureAirports> GetGenerator(List <string> airports = null)
 {
     return(new Faker <SectorDepartureAirports>()
            .CustomInstantiator(
                _ => new SectorDepartureAirports(
                    airports ?? AirportFactory.GetListOfDesignators(),
                    DefinitionFactory.Make(),
                    DocblockFactory.Make(),
                    CommentFactory.Make()
                    )
                ));
 }
 public static Faker <SectorlineCoordinate> GetGenerator()
 {
     return(new Faker <SectorlineCoordinate>()
            .CustomInstantiator(
                _ => new SectorlineCoordinate(
                    CoordinateFactory.Make(),
                    DefinitionFactory.Make(),
                    DocblockFactory.Make(),
                    CommentFactory.Make()
                    )
                ));
 }
示例#11
0
 public static SectorData Make()
 {
     return(new(
                DocblockFactory.Make(),
                CommentFactory.Make(),
                new List <string> {
         "abc", "def", "ghi"
     },
                "abc def ghi",
                DefinitionFactory.Make()
                ));
 }
 public static GroundNetworkCoordinate Make(Coordinate?coordinate = null)
 {
     return(new Faker <GroundNetworkCoordinate>()
            .CustomInstantiator(
                _ => new GroundNetworkCoordinate(
                    coordinate ?? CoordinateFactory.Make(),
                    DefinitionFactory.Make(),
                    DocblockFactory.Make(),
                    CommentFactory.Make()
                    )
                ));
 }
示例#13
0
 public static Fix Make(string identifier = null, Coordinate?coordinate = null)
 {
     return(new Faker <Fix>()
            .CustomInstantiator(
                f => new Fix(
                    identifier ?? f.Random.ArrayElement(Identifiers),
                    coordinate ?? CoordinateFactory.Make(),
                    DefinitionFactory.Make(),
                    DocblockFactory.Make(),
                    CommentFactory.Make()
                    )
                ));
 }
示例#14
0
 public static Colour Make(string identifier = null, int?value = null)
 {
     return(new Faker <Colour>()
            .CustomInstantiator(
                f => new Colour(
                    identifier ?? f.Random.ArrayElement(Identifiers),
                    value ?? f.Random.Int(0, 16777215),
                    DefinitionFactory.Make(),
                    DocblockFactory.Make(),
                    CommentFactory.Make()
                    )
                ));
 }
 private static Faker <SectorActive> GetGenerator(string airport = null, string runway = null)
 {
     return(new Faker <SectorActive>()
            .CustomInstantiator(
                _ => new SectorActive(
                    airport ?? AirportFactory.GetRandomDesignator(),
                    runway ?? RunwayFactory.GetRandomDesignator(),
                    DefinitionFactory.Make(),
                    DocblockFactory.Make(),
                    CommentFactory.Make()
                    )
                ));
 }
 private static Faker <SectorAlternateOwnerHierarchy> GetGenerator(List <string> positions = null)
 {
     return(new Faker <SectorAlternateOwnerHierarchy>()
            .CustomInstantiator(
                f => new SectorAlternateOwnerHierarchy(
                    f.Random.String2(4),
                    positions ?? ControllerPositionFactory.GetIdentifierList(),
                    DefinitionFactory.Make(),
                    DocblockFactory.Make(),
                    CommentFactory.Make()
                    )
                ));
 }
 public static RouteSegment MakeCoordinatePoint(string pointIdentifier = null, Coordinate?coordinate = null)
 {
     return(new Faker <RouteSegment>()
            .CustomInstantiator(
                f => new RouteSegment(
                    f.Random.String2(4),
                    coordinate == null ? new Point(CoordinateFactory.Make()) : new Point((Coordinate)coordinate),
                    new Point(pointIdentifier ?? f.Random.ArrayElement(Identifiers)),
                    DefinitionFactory.Make(),
                    DocblockFactory.Make(),
                    CommentFactory.Make()
                    )
                ));
 }
示例#18
0
 public static Freetext Make(Definition definition = null)
 {
     return(new Faker <Freetext>()
            .CustomInstantiator(
                _ => new Freetext(
                    "Test Title",
                    "Test Freetext",
                    CoordinateFactory.Make(),
                    definition ?? DefinitionFactory.Make(),
                    DocblockFactory.Make(),
                    CommentFactory.Make()
                    )
                ));
 }
示例#19
0
 public static Vor Make(string identifier = null)
 {
     return(new Faker <Vor>()
            .CustomInstantiator(
                f => new Vor(
                    identifier ?? f.Random.ArrayElement(Identifiers),
                    "123.456",
                    CoordinateFactory.Make(),
                    DefinitionFactory.Make(),
                    DocblockFactory.Make(),
                    CommentFactory.Make()
                    )
                ));
 }
 public static ActiveRunway Make(string airfieldIcao = null, string runwayDesignator = null, int?mode = null)
 {
     return(new Faker <ActiveRunway>()
            .CustomInstantiator(
                f => new ActiveRunway(
                    runwayDesignator ?? RunwayFactory.GetRandomDesignator(),
                    airfieldIcao ?? AirportFactory.GetRandomDesignator(),
                    mode ?? (f.Random.Bool() ? 1 : 0),
                    DefinitionFactory.Make(),
                    DocblockFactory.Make(),
                    CommentFactory.Make()
                    )
                ));
 }
 public static RouteSegment MakeDoublePointWithNoColour(string identifier1 = null, string identifier2 = null)
 {
     return(new Faker <RouteSegment>()
            .CustomInstantiator(
                f => new RouteSegment(
                    f.Random.String2(4),
                    new Point(identifier1 ?? f.Random.ArrayElement(Identifiers)),
                    new Point(identifier2 ?? f.Random.ArrayElement(Identifiers)),
                    DefinitionFactory.Make(),
                    DocblockFactory.Make(),
                    CommentFactory.Make()
                    )
                ));
 }
 private static Faker <GeoSegment> GetGenerator(string colour = null, Point firstPoint = null, Point secondPoint = null)
 {
     return(new Faker <GeoSegment>()
            .CustomInstantiator(
                _ => new GeoSegment(
                    firstPoint ?? PointFactory.Make(),
                    secondPoint ?? PointFactory.Make(),
                    colour ?? "red",
                    DefinitionFactory.Make(),
                    DocblockFactory.Make(),
                    CommentFactory.Make()
                    )
                ));
 }
示例#23
0
 private static Faker <Sectorline> GetGenerator(string name = null, List <SectorlineDisplayRule> displayRules = null, Definition definition = null)
 {
     return(new Faker <Sectorline>()
            .CustomInstantiator(
                f => new Sectorline(
                    name ?? f.Random.String2(5),
                    displayRules ?? SectorLineDisplayRuleFactory.MakeList(2),
                    SectorlineCoordinateFactory.MakeList(4),
                    definition ?? DefinitionFactory.Make(),
                    DocblockFactory.Make(),
                    CommentFactory.Make()
                    )
                ));
 }
 private static Faker <SectorlineDisplayRule> GetGenerator(string controlledSector = null, string firstCompare = null, string secondCompare = null)
 {
     return(new Faker <SectorlineDisplayRule>()
            .CustomInstantiator(
                f => new SectorlineDisplayRule(
                    controlledSector ?? f.Random.String2(4),
                    firstCompare ?? f.Random.String2(4),
                    secondCompare ?? f.Random.String2(4),
                    DefinitionFactory.Make(),
                    DocblockFactory.Make(),
                    CommentFactory.Make()
                    )
                ));
 }
 private static Faker <CircleSectorline> GetGenerator(string name = null, string centre = null, List <SectorlineDisplayRule> displayRules = null, Definition definition = null)
 {
     return(new Faker <CircleSectorline>()
            .CustomInstantiator(
                f => new CircleSectorline(
                    name ?? f.Random.String2(5),
                    centre ?? f.Random.String2(4),
                    f.Random.Double(0.5D, 10D),
                    displayRules ?? SectorLineDisplayRuleFactory.MakeList(2),
                    definition ?? DefinitionFactory.Make(),
                    DocblockFactory.Make(),
                    CommentFactory.Make()
                    )
                ));
 }
示例#26
0
 public static ArtccSegment Make(ArtccType type = ArtccType.REGULAR, string identifier = null)
 {
     return(new Faker <ArtccSegment>()
            .CustomInstantiator(
                _ => new ArtccSegment(
                    identifier ?? "EGTT",
                    type,
                    PointFactory.Make(),
                    PointFactory.Make(),
                    DefinitionFactory.Make(),
                    DocblockFactory.Make(),
                    CommentFactory.Make()
                    )
                ));
 }
示例#27
0
 private static Faker <SectorBorder> GetGenerator()
 {
     return(new Faker <SectorBorder>()
            .CustomInstantiator(
                _ => new SectorBorder(
                    new List <string>()
     {
         "abc", "def", "ghi"
     },
                    DefinitionFactory.Make(),
                    DocblockFactory.Make(),
                    CommentFactory.Make()
                    )
                ));
 }
 public static AirwaySegment Make(AirwayType type = AirwayType.LOW, string identifier = null)
 {
     return(new Faker <AirwaySegment>()
            .CustomInstantiator(
                f => new AirwaySegment(
                    identifier ?? $"{(type == AirwayType.HIGH ? "U" : "")}{f.Random.ArrayElement(Identifiers)}",
                    type,
                    PointFactory.Make(),
                    PointFactory.Make(),
                    DefinitionFactory.Make(),
                    DocblockFactory.Make(),
                    CommentFactory.Make()
                    )
                ));
 }
 public static Airport Make(string icao = null)
 {
     return(new Faker <Airport>()
            .CustomInstantiator(
                f => new Airport(
                    f.Random.String2(10),
                    icao ?? GetRandomDesignator(),
                    CoordinateFactory.Make(),
                    "123.450",
                    DefinitionFactory.Make(),
                    DocblockFactory.Make(),
                    CommentFactory.Make()
                    )
                ));
 }
示例#30
0
 public static SidStar Make(bool isSid = true, string airport = null, string runway = null, string identifier = null, List <string> route = null)
 {
     return(new Faker <SidStar>()
            .CustomInstantiator(
                f => new SidStar(
                    isSid ? "SID" : "STAR",
                    airport ?? AirportFactory.GetRandomDesignator(),
                    runway ?? RunwayFactory.GetRandomDesignator(),
                    identifier ?? f.Random.ArrayElement(Identifiers),
                    route ?? FixFactory.RandomIdentifiers(3),
                    DefinitionFactory.Make(),
                    DocblockFactory.Make(),
                    CommentFactory.Make()
                    )
                ));
 }