Files
vegasco/tests/Vegasco.Server.Api.Tests.Integration/ConsumptionFaker.cs
ThompsonNye c58f6fe364
All checks were successful
continuous-integration/drone/push Build is passing
Drop IgnoreInCalculation property
2025-06-22 11:07:02 +02:00

27 lines
673 B
C#

using Bogus;
using Vegasco.Server.Api.Consumptions;
namespace Vegasco.Server.Api.Tests.Integration;
internal class ConsumptionFaker
{
private readonly Faker _faker = new();
internal CreateConsumption.Request CreateConsumptionRequest(Guid carId)
{
return new CreateConsumption.Request(
_faker.Date.RecentOffset(),
_faker.Random.Int(1, 1_000),
_faker.Random.Int(20, 70),
carId);
}
internal UpdateConsumption.Request UpdateConsumptionRequest()
{
CreateConsumption.Request createRequest = CreateConsumptionRequest(default);
return new UpdateConsumption.Request(
createRequest.DateTime,
createRequest.Distance,
createRequest.Amount);
}
}