Re-write the remaining tests

This commit is contained in:
Sven van Heugten 2026-01-17 10:03:17 +01:00
parent ec90147c07
commit 62c8e446c9
6 changed files with 116 additions and 199 deletions

View file

@ -147,5 +147,12 @@ type FakeHome with
member this.LightsThatAreOn =
this.LightStates |> Seq.filter (snd >> _.IsOn) |> Seq.toList
member this.LightShouldHaveState light condition =
this.LightStates |> Seq.find (fst >> (=) light) |> snd |> condition
member this.NonRemotelyControlledLightStates =
this.LightStates
|> Seq.filter (fst >> _.ControlledWithRemote >> (=) NonRemote)
|> Seq.toList
member this.RemotelyControlledLightStates =
this.LightStates
|> Seq.filter (fst >> _.ControlledWithRemote >> (<>) NonRemote)
|> Seq.toList