Created
November 17, 2023 07:50
-
-
Save stijnmoreels/0eeded30549546c32492ce97f4649172 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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