Skip to content

Instantly share code, notes, and snippets.

@stijnmoreels
Created November 17, 2023 07:50
Show Gist options
  • Save stijnmoreels/0eeded30549546c32492ce97f4649172 to your computer and use it in GitHub Desktop.
Save stijnmoreels/0eeded30549546c32492ce97f4649172 to your computer and use it in GitHub Desktop.
module Label =
let capacityOn d current =
List.filter (fun x -> x.Date = d) current
|> List.sumBy Reservation.quantity
|> (sprintf "\n\tcapacity on %A: %i" d)
testProperty "restaurant accepts reservation within two weeks if the requested quantity is available" <| fun () ->
withGen Gen.Reservation.available <| fun (addition, current) ->
reserveTable current addition = Ok (addition :: current)
|@ (Label.capacityOn addition.Date current)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment