38 lines
1.1 KiB
FSharp
38 lines
1.1 KiB
FSharp
namespace NightLight.Core.Tests
|
|
|
|
open NightLight.Core.Models
|
|
open FsCheck.FSharp
|
|
|
|
type ArbitraryLight =
|
|
static member Light() = lights |> Gen.elements |> Arb.fromGen
|
|
|
|
type ArbitraryNonRemotelyControlledLight =
|
|
static member Light() =
|
|
lights
|
|
|> Seq.filter (fun light ->
|
|
light = VardagsrumVagglampa
|
|
|| light = VardagsrumGolvlampa
|
|
|| light = BadrumTaklampa)
|
|
|> Gen.elements
|
|
|> Arb.fromGen
|
|
|
|
type ArbitraryLeftRemotelyControlledLight =
|
|
static member Light() =
|
|
lights
|
|
|> Seq.filter (fun light -> light = SovrumNattduksbordlampa)
|
|
|> Gen.elements
|
|
|> Arb.fromGen
|
|
|
|
type ArbitraryRightRemotelyControlledLight =
|
|
static member Light() =
|
|
lights
|
|
|> Seq.filter (fun light -> light = VardagsrumFonsterlampa)
|
|
|> Gen.elements
|
|
|> Arb.fromGen
|
|
|
|
type ArbitraryRemotelyControlledLight =
|
|
static member Light() =
|
|
lights
|
|
|> Seq.filter (fun light -> light = VardagsrumFonsterlampa || light = SovrumNattduksbordlampa)
|
|
|> Gen.elements
|
|
|> Arb.fromGen
|