Improve types for remote button presses in tests

This commit is contained in:
Sven van Heugten 2026-03-15 11:33:26 +01:00
parent 3913522cc3
commit 1dc1faa16a
4 changed files with 25 additions and 27 deletions

View file

@ -36,12 +36,11 @@ let private genHumanInteraction =
|> Gen.map Interaction.HumanInteraction
let private genRemoteInteraction =
Gen.elements
[ RemotePressedOnButton
RemotePressedOffButton
RemotePressedLeftButton
RemotePressedRightButton ]
|> Gen.map RemoteInteraction
Gen.oneof
[ Gen.elements [ RemotePressedOnButton; RemotePressedOffButton; RemotePressedLeftButton ]
|> Gen.map BedroomControllingRemoteInteraction
Gen.constant (LivingRoomControllingRemoteInteraction RemotePressedRightButton) ]
let private genInteraction =
Gen.frequency [ 4, genTimeChanged; 1, genHumanInteraction; 1, genRemoteInteraction ]