Give every light its own type
This commit is contained in:
parent
dbb0389e61
commit
50c8a413a6
6 changed files with 72 additions and 50 deletions
|
|
@ -9,27 +9,27 @@ type ArbitraryLight =
|
|||
type ArbitraryNonRemotelyControlledLight =
|
||||
static member Light() =
|
||||
lights
|
||||
|> Seq.filter _.ControlledWithRemote.IsNonRemote
|
||||
|> Seq.filter (fun light -> (lightProps light).ControlledWithRemote.IsNonRemote)
|
||||
|> Gen.elements
|
||||
|> Arb.fromGen
|
||||
|
||||
type ArbitraryLeftRemotelyControlledLight =
|
||||
static member Light() =
|
||||
lights
|
||||
|> Seq.filter _.ControlledWithRemote.IsRemoteLeft
|
||||
|> Seq.filter (fun light -> (lightProps light).ControlledWithRemote.IsRemoteLeft)
|
||||
|> Gen.elements
|
||||
|> Arb.fromGen
|
||||
|
||||
type ArbitraryRightRemotelyControlledLight =
|
||||
static member Light() =
|
||||
lights
|
||||
|> Seq.filter _.ControlledWithRemote.IsRemoteRight
|
||||
|> Seq.filter (fun light -> (lightProps light).ControlledWithRemote.IsRemoteRight)
|
||||
|> Gen.elements
|
||||
|> Arb.fromGen
|
||||
|
||||
type ArbitraryRemotelyControlledLight =
|
||||
static member Light() =
|
||||
lights
|
||||
|> Seq.filter (not << _.ControlledWithRemote.IsNonRemote)
|
||||
|> Seq.filter (fun light -> (lightProps light).ControlledWithRemote.IsNonRemote |> not)
|
||||
|> Gen.elements
|
||||
|> Arb.fromGen
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue