mirror of
https://github.com/meysamhadeli/booking-microservices.git
synced 2026-04-12 11:32:10 +08:00
20 lines
632 B
C#
20 lines
632 B
C#
using AutoBogus;
|
|
using BuildingBlocks.IdsGenerator;
|
|
using Flight.Flights.Enums;
|
|
using Flight.Flights.Features.CreateFlight.Commands.V1;
|
|
|
|
namespace Integration.Test.Fakes;
|
|
|
|
public sealed class FakeCreateFlightCommand : AutoFaker<CreateFlightCommand>
|
|
{
|
|
public FakeCreateFlightCommand()
|
|
{
|
|
RuleFor(r => r.Id, _ => SnowFlakIdGenerator.NewId());
|
|
RuleFor(r => r.FlightNumber, r => r.Random.String());
|
|
RuleFor(r => r.DepartureAirportId, _ => 1);
|
|
RuleFor(r => r.ArriveAirportId, _ => 2);
|
|
RuleFor(r => r.Status, _ => FlightStatus.Flying);
|
|
RuleFor(r => r.AircraftId, _ => 1);
|
|
}
|
|
}
|