Skip to content

Commit

Permalink
test: or-2558 make sure date cannot be leap date
Browse files Browse the repository at this point in the history
  • Loading branch information
koenmetsu authored and janlesage committed Nov 21, 2024
1 parent 699fae2 commit d378adb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,10 @@ private static void CustomizeRegistreerFeitelijkeVerenigingRequest(this IFixture
_ =>
{
var datum = fixture.Create<Datum>();
var startDatum = new DateOnly(new Random().Next(minValue: 1970, DateTime.Now.Year), datum.Value.Month, datum.Value.Day);
var startDatum = new DateOnly(new Random().Next(minValue: 1970, DateTime.Now.Year),
datum.Value.Month,
Math.Min(datum.Value.Day, 28));

var request = new RegistreerFeitelijkeVerenigingRequest();

request.Contactgegevens = fixture.CreateMany<ToeTeVoegenContactgegeven>().ToArray();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ private static void CustomizeRegistreerFeitelijkeVerenigingRequest(this IFixture
_ =>
{
var datum = fixture.Create<Datum>();
var startDatum = new DateOnly(new Random().Next(minValue: 1970, DateTime.Now.Year), datum.Value.Month, datum.Value.Day);
var startDatum = new DateOnly(new Random().Next(minValue: 1970, DateTime.Now.Year),
datum.Value.Month,
Math.Min(datum.Value.Day, 28));
var request = new RegistreerFeitelijkeVerenigingRequest();

request.Contactgegevens = fixture.CreateMany<ToeTeVoegenContactgegeven>().ToArray();
Expand Down

0 comments on commit d378adb

Please sign in to comment.