Use concrete types
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-06-24 19:28:55 +02:00
parent 8681247e76
commit ab32be98a6
20 changed files with 48 additions and 48 deletions

View File

@@ -43,7 +43,7 @@ public class DeleteConsumptionTests : IAsyncLifetime
public async Task DeleteConsumption_ShouldReturnNotFound_WhenConsumptionDoesNotExist()
{
// Arrange
var consumptionId = Guid.NewGuid();
Guid consumptionId = Guid.NewGuid();
// Act
using HttpResponseMessage response = await _factory.HttpClient.DeleteAsync($"v1/consumptions/{consumptionId}");
@@ -58,7 +58,7 @@ public class DeleteConsumptionTests : IAsyncLifetime
CreateConsumption.Request createConsumptionRequest = _consumptionFaker.CreateConsumptionRequest(createdCarResponse.Id);
using HttpResponseMessage response = await _factory.HttpClient.PostAsJsonAsync("v1/consumptions", createConsumptionRequest);
response.EnsureSuccessStatusCode();
var createdConsumption = await response.Content.ReadFromJsonAsync<CreateConsumption.Response>();
CreateConsumption.Response? createdConsumption = await response.Content.ReadFromJsonAsync<CreateConsumption.Response>();
return createdConsumption!;
}
@@ -67,7 +67,7 @@ public class DeleteConsumptionTests : IAsyncLifetime
CreateCar.Request createCarRequest = new CarFaker().CreateCarRequest();
using HttpResponseMessage createCarResponse = await _factory.HttpClient.PostAsJsonAsync("v1/cars", createCarRequest);
createCarResponse.EnsureSuccessStatusCode();
var createdCarResponse = await createCarResponse.Content.ReadFromJsonAsync<CreateCar.Response>();
CreateCar.Response? createdCarResponse = await createCarResponse.Content.ReadFromJsonAsync<CreateCar.Response>();
return createdCarResponse!;
}