Use wrapper class for get all api endpoints
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
To enable e.g. pagination in the future
This commit is contained in:
@@ -42,8 +42,8 @@ public class GetConsumptionsTests : IAsyncLifetime
|
||||
|
||||
// Assert
|
||||
response.StatusCode.Should().Be(HttpStatusCode.OK);
|
||||
var consumptions = await response.Content.ReadFromJsonAsync<List<GetConsumptions.Response>>();
|
||||
consumptions.Should().BeEquivalentTo(createdConsumptions);
|
||||
var apiResponse = await response.Content.ReadFromJsonAsync<GetConsumptions.ApiResponse>();
|
||||
apiResponse!.Consumptions.Should().BeEquivalentTo(createdConsumptions);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -56,8 +56,8 @@ public class GetConsumptionsTests : IAsyncLifetime
|
||||
|
||||
// Assert
|
||||
response.StatusCode.Should().Be(HttpStatusCode.OK);
|
||||
var consumptions = await response.Content.ReadFromJsonAsync<List<GetConsumptions.Response>>();
|
||||
consumptions.Should().BeEmpty();
|
||||
var apiResponse = await response.Content.ReadFromJsonAsync<GetConsumptions.ApiResponse>();
|
||||
apiResponse!.Consumptions.Should().BeEmpty();
|
||||
}
|
||||
|
||||
private async Task<CreateConsumption.Response> CreateConsumptionAsync()
|
||||
|
||||
Reference in New Issue
Block a user