Improve types for remote button presses in tests
This commit is contained in:
parent
3913522cc3
commit
1dc1faa16a
4 changed files with 25 additions and 27 deletions
|
|
@ -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 ]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue