Introduce the remote into FakeHome
This commit is contained in:
parent
cef2a20f7a
commit
52e0ec85e9
2 changed files with 34 additions and 6 deletions
|
|
@ -8,11 +8,15 @@ let private genTimeChangedInteraction =
|
|||
ArbMap.defaults |> ArbMap.generate<DateTime> |> Gen.map Interaction.TimeChanged
|
||||
|
||||
let private genHumanInteraction =
|
||||
Gen.elements lights
|
||||
|> Gen.bind (fun light ->
|
||||
[ LightPoweredOn light; LightPoweredOff light ]
|
||||
|> Gen.elements
|
||||
|> Gen.map Interaction.HumanInteraction)
|
||||
let genLightInteraction =
|
||||
Gen.elements lights
|
||||
|> Gen.bind (fun light -> Gen.elements [ LightPoweredOn light; LightPoweredOff light ])
|
||||
|
||||
let genRemoteInteraction =
|
||||
Gen.elements [ RemotePressedOnButton; RemotePressedOffButton ]
|
||||
|
||||
Gen.oneof [ genLightInteraction; genRemoteInteraction ]
|
||||
|> Gen.map Interaction.HumanInteraction
|
||||
|
||||
let private genInteraction =
|
||||
Gen.oneof [ genTimeChangedInteraction; genHumanInteraction ]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue