New Angular based web version #1
@@ -5,15 +5,15 @@ namespace Vegasco.Server.Api.Tests.Integration;
|
|||||||
|
|
||||||
internal class CarFaker
|
internal class CarFaker
|
||||||
{
|
{
|
||||||
private readonly Faker _faker = new();
|
|
||||||
|
|
||||||
internal CreateCar.Request CreateCarRequest()
|
internal CreateCar.Request CreateCarRequest()
|
||||||
{
|
{
|
||||||
return new CreateCar.Request(_faker.Person.FirstName);
|
Faker faker = new();
|
||||||
|
return new CreateCar.Request(faker.Person.FirstName);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal UpdateCar.Request UpdateCarRequest()
|
internal UpdateCar.Request UpdateCarRequest()
|
||||||
{
|
{
|
||||||
return new UpdateCar.Request(_faker.Person.FirstName);
|
Faker faker = new();
|
||||||
|
return new UpdateCar.Request(faker.Person.FirstName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5,20 +5,19 @@ namespace Vegasco.Server.Api.Tests.Integration;
|
|||||||
|
|
||||||
internal class ConsumptionFaker
|
internal class ConsumptionFaker
|
||||||
{
|
{
|
||||||
private readonly Faker _faker = new();
|
|
||||||
|
|
||||||
internal CreateConsumption.Request CreateConsumptionRequest(Guid carId)
|
internal CreateConsumption.Request CreateConsumptionRequest(Guid carId)
|
||||||
{
|
{
|
||||||
|
Faker faker = new();
|
||||||
return new CreateConsumption.Request(
|
return new CreateConsumption.Request(
|
||||||
_faker.Date.RecentOffset(),
|
faker.Date.RecentOffset(),
|
||||||
_faker.Random.Int(1, 1_000),
|
faker.Random.Int(1, 1_000),
|
||||||
_faker.Random.Int(20, 70),
|
faker.Random.Int(20, 70),
|
||||||
carId);
|
carId);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal UpdateConsumption.Request UpdateConsumptionRequest()
|
internal UpdateConsumption.Request UpdateConsumptionRequest()
|
||||||
{
|
{
|
||||||
CreateConsumption.Request createRequest = CreateConsumptionRequest(default);
|
CreateConsumption.Request createRequest = CreateConsumptionRequest(Guid.Empty);
|
||||||
return new UpdateConsumption.Request(
|
return new UpdateConsumption.Request(
|
||||||
createRequest.DateTime,
|
createRequest.DateTime,
|
||||||
createRequest.Distance,
|
createRequest.Distance,
|
||||||
|
|||||||
Reference in New Issue
Block a user