Bias the TimeChanged generator to make alarms more likely
This commit is contained in:
parent
fd7d927775
commit
59a1b1e41d
3 changed files with 26 additions and 4 deletions
|
|
@ -41,8 +41,7 @@ type NightLightTests() =
|
|||
|> Prop.label fakeHome.Label
|
||||
|> Prop.trivial (fakeHome.LightsThatAreOn.Length = 0)
|
||||
|
||||
// TODO: Bias generator for alarm cases so that `MaxTest` can be reduced
|
||||
[<Property(Arbitrary = [| typeof<ArbitraryInteractions> |], MaxTest = 10_000)>]
|
||||
[<Property(Arbitrary = [| typeof<ArbitraryInteractions> |])>]
|
||||
let ``All lights should either be off or have a brightness that fits its color`` (interactions: Interaction list) =
|
||||
let fakeHome = createFakeHomeWithNightLightAndInteract interactions
|
||||
let time = getTimeAfterInteractions interactions |> _.TimeOfDay
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue