Hi,
ok, bit of a shame that I have to rewrite all the tests now.
2 more questions:
Hi, Thanks this works for me. However, for my real project, I have a lot of seed methods. Is there any other way than adding the if condition to every insert statement now? In addition: In my project I have tests like following which fail with the same error. What should I do here?
[Fact]
public async Task CreateAsync()
{
// Arrange
var input = new CustomerCreateDto
{
Name = "bf64c99897834",
Street = "30b28c8ff57b464d9bc2f5618f15be1c75930a933aa140cb80f614f124bb3f0461f45",
Postcode = "aa2e0879154b4a2bbf78597283eb7e57",
City = "5f4242b5aa61476a97c3e5af411cf498521949a2ad2c47edbbbe",
Country = "c83c88797e63411f882bdd48759e99e87679b076e154472482c6e885b56830cf82abbd257b894cd0a8588a73ad277e3c7c6d",
VATNo = "d6d31592918a4f0f96ee23ad51a87e0ab5b0f1b49ccb41acbf85136106af9ba445de4a676ed14b4db27c63267679c6d8def4",
Status = default,
State = "76d47ce8de444b898aa5565717a4f154c746171559174f87a9fff21f832690097571c7457c7544b3a3041662529c371a881e"
};
// Act
var serviceResult = await _customersAppService.CreateAsync(input);
// Assert
var result = await _customerRepository.FindAsync(c => c.Id == serviceResult.Id);
result.ShouldNotBe(null);
result.Name.ShouldBe("bf64c99897834");
result.Street.ShouldBe("30b28c8ff57b464d9bc2f5618f15be1c75930a933aa140cb80f614f124bb3f0461f45");
result.Postcode.ShouldBe("aa2e0879154b4a2bbf78597283eb7e57");
result.City.ShouldBe("5f4242b5aa61476a97c3e5af411cf498521949a2ad2c47edbbbe");
result.Country.ShouldBe("c83c88797e63411f882bdd48759e99e87679b076e154472482c6e885b56830cf82abbd257b894cd0a8588a73ad277e3c7c6d");
result.VATNo.ShouldBe("d6d31592918a4f0f96ee23ad51a87e0ab5b0f1b49ccb41acbf85136106af9ba445de4a676ed14b4db27c63267679c6d8def4");
result.Status.ShouldBe(default);
result.State.ShouldBe("76d47ce8de444b898aa5565717a4f154c746171559174f87a9fff21f832690097571c7457c7544b3a3041662529c371a881e");
}