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()
                    )
                ));
 }
Пример #2
0
        public static Point Make()
        {
            Faker faker = new();

            return(faker.Random.Bool()
                ? new Point(CoordinateFactory.Make())
                : new Point(faker.Random.ArrayElement(Identifiers)));
        }
 public static RunwayCentrelineSegment Make()
 {
     return(new Faker <RunwayCentrelineSegment>()
            .CustomInstantiator(
                _ => new RunwayCentrelineSegment(
                    CoordinateFactory.Make(),
                    CoordinateFactory.Make()
                    )
                ));
 }
 public static Faker <SectorlineCoordinate> GetGenerator()
 {
     return(new Faker <SectorlineCoordinate>()
            .CustomInstantiator(
                _ => new SectorlineCoordinate(
                    CoordinateFactory.Make(),
                    DefinitionFactory.Make(),
                    DocblockFactory.Make(),
                    CommentFactory.Make()
                    )
                ));
 }
 public static GroundNetworkCoordinate Make(Coordinate?coordinate = null)
 {
     return(new Faker <GroundNetworkCoordinate>()
            .CustomInstantiator(
                _ => new GroundNetworkCoordinate(
                    coordinate ?? CoordinateFactory.Make(),
                    DefinitionFactory.Make(),
                    DocblockFactory.Make(),
                    CommentFactory.Make()
                    )
                ));
 }
Пример #6
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()
                    )
                ));
 }
Пример #7
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()
                    )
                ));
 }
Пример #8
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 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()
                    )
                ));
 }
 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()
                    )
                ));
 }
Пример #11
0
 public static Runway Make(string airfieldIcao = null, string designator1 = null, string designator2 = null)
 {
     return(new Faker <Runway>()
            .CustomInstantiator(
                f => new Runway(
                    airfieldIcao ?? AirportFactory.GetRandomDesignator(),
                    designator1 ?? f.Random.ArrayElement(Designators),
                    000,
                    CoordinateFactory.Make(),
                    designator2 ?? f.Random.ArrayElement(Designators),
                    000,
                    CoordinateFactory.Make(),
                    DefinitionFactory.Make(),
                    DocblockFactory.Make(),
                    CommentFactory.Make()
                    )
                ));
 }
Пример #12
0
 public static Label Make(
     string text           = null,
     string colour         = null,
     Definition definition = null
     )
 {
     return(new Faker <Label>()
            .CustomInstantiator(
                _ => new Label(
                    text ?? "Test Label",
                    CoordinateFactory.Make(),
                    colour ?? ColourFactory.RandomIdentifier(),
                    definition ?? DefinitionFactory.Make(),
                    DocblockFactory.Make(),
                    CommentFactory.Make()
                    )
                ));
 }