Rewrite two tests with Prop.classify instead

This commit is contained in:
Sven van Heugten 2026-01-16 21:17:37 +01:00
parent 79405b3841
commit f22f31ee6c
3 changed files with 29 additions and 24 deletions

View file

@ -144,5 +144,8 @@ type FakeHome() =
type FakeHome with
member this.Interact(interactions: Interaction seq) = interactions |> Seq.iter this.Interact
member this.LightsThatAreOn =
this.LightStates |> Seq.filter (snd >> _.IsOn) |> Seq.toList
member this.LightShouldHaveState light condition =
this.LightStates |> Seq.find (fst >> (=) light) |> snd |> condition