Add consumption entity and use strongly typed ids

This commit is contained in:
2024-08-17 18:00:23 +02:00
parent 4bfc57ef9f
commit d47e4c1971
19 changed files with 265 additions and 36 deletions

View File

@@ -38,7 +38,8 @@ public class CreateCarTests : IAsyncLifetime
var createdCar = await response.Content.ReadFromJsonAsync<CreateCar.Response>();
createdCar.Should().BeEquivalentTo(createCarRequest, o => o.ExcludingMissingMembers());
_dbContext.Cars.Should().ContainEquivalentOf(createdCar);
_dbContext.Cars.Should().ContainEquivalentOf(createdCar, o => o.Excluding(x => x!.Id))
.Which.Id.Value.Should().Be(createdCar!.Id);
}
[Fact]