Simplify classify by using collect
This commit is contained in:
parent
8866053172
commit
ec90147c07
1 changed files with 2 additions and 3 deletions
|
|
@ -37,10 +37,9 @@ type NightLightTests() =
|
||||||
match partOfDay with
|
match partOfDay with
|
||||||
| Day -> color = White || color = Yellow
|
| Day -> color = White || color = Yellow
|
||||||
| Night -> color = Red)
|
| Night -> color = Red)
|
||||||
|> Prop.classify (partOfDay = Day) "day"
|
|> Prop.collect partOfDay
|
||||||
|> Prop.classify (partOfDay = Night) "night"
|
|
||||||
|> Prop.trivial (fakeHome.LightsThatAreOn.Length = 0)
|
|
||||||
|> Prop.collect $"{fakeHome.LightsThatAreOn.Length} light(s) on"
|
|> Prop.collect $"{fakeHome.LightsThatAreOn.Length} light(s) on"
|
||||||
|
|> Prop.trivial (fakeHome.LightsThatAreOn.Length = 0)
|
||||||
|
|
||||||
[<Property(Arbitrary = [| typeof<ArbitraryInteractions> |])>]
|
[<Property(Arbitrary = [| typeof<ArbitraryInteractions> |])>]
|
||||||
let ``All non-remotely controlled lights that have power should be on`` (interactions: Interaction list) =
|
let ``All non-remotely controlled lights that have power should be on`` (interactions: Interaction list) =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue