Generalize the genInteractionListThatEndsAtTime concept
This commit is contained in:
parent
9e97d9a37b
commit
14cfaaeed5
3 changed files with 24 additions and 20 deletions
|
|
@ -21,12 +21,12 @@ type NightLightTests() =
|
|||
|
||||
fakeHome
|
||||
|
||||
[<Property(Arbitrary = [| typeof<ArbitraryInteractionsListThatEndsDuringTheDay> |])>]
|
||||
[<Property(Arbitrary = [| typeof<ArbitraryInteractionListThatEndsDuringTheDay> |])>]
|
||||
let ``Lights should be white or yellow during the day`` (interactions: Interaction list) =
|
||||
let fakeHome = createFakeHomeWithNightLightAndInteract interactions
|
||||
fakeHome.ForAllLightsThatAreOn(fun (_, _, color) -> color = White || color = Yellow)
|
||||
|
||||
[<Property(Arbitrary = [| typeof<ArbitraryInteractionsListThatEndsDuringTheNight> |])>]
|
||||
[<Property(Arbitrary = [| typeof<ArbitraryInteractionListThatEndsDuringTheNight> |])>]
|
||||
let ``Lights should be red during the night`` (interactions: Interaction list) =
|
||||
let fakeHome = createFakeHomeWithNightLightAndInteract interactions
|
||||
fakeHome.ForAllLightsThatAreOn(fun (_, _, color) -> color = Red)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue