diff --git a/NightLight.Core.Tests/InteractionListGenerators.fs b/NightLight.Core.Tests/InteractionListGenerators.fs index d901847..269c94e 100644 --- a/NightLight.Core.Tests/InteractionListGenerators.fs +++ b/NightLight.Core.Tests/InteractionListGenerators.fs @@ -28,12 +28,12 @@ let private genInteractionsListThatStartsWithTimeChanged = return firstInteraction :: remainingInteractions } -let genInteractionListContaining containingInteraction afterFilter = +let genInteractionListContaining containingInteraction disqualifiedAfter = gen { let genNonTrivialList = gen { let! before = genInteractionsListThatStartsWithTimeChanged - let! after = Gen.listOf (genInteraction |> Gen.filter afterFilter) + let! after = Gen.listOf (genInteraction |> Gen.filter (not << disqualifiedAfter)) return before @ containingInteraction :: after } diff --git a/NightLight.Core.Tests/NightLightTests.fs b/NightLight.Core.Tests/NightLightTests.fs index f19afa7..57ed0f4 100644 --- a/NightLight.Core.Tests/NightLightTests.fs +++ b/NightLight.Core.Tests/NightLightTests.fs @@ -26,7 +26,7 @@ type NightLightTests() = [] let ``All lights that are on should be white or yellow during the day`` () = genTimeChangedToDay - |> Gen.bind (fun timeChangedToDay -> genInteractionListContaining timeChangedToDay (not << _.IsTimeChanged)) + |> Gen.bind (fun timeChangedToDay -> genInteractionListContaining timeChangedToDay _.IsTimeChanged) |> Arb.fromGen |> Prop.forAll <| fun interactions -> @@ -36,7 +36,7 @@ type NightLightTests() = [] let ``All lights that are on should be red during the night`` () = genTimeChangedToNight - |> Gen.bind (fun timeChangedToNight -> genInteractionListContaining timeChangedToNight (not << _.IsTimeChanged)) + |> Gen.bind (fun timeChangedToNight -> genInteractionListContaining timeChangedToNight _.IsTimeChanged) |> Arb.fromGen |> Prop.forAll <| fun interactions -> @@ -49,7 +49,7 @@ type NightLightTests() = = genInteractionListContaining (HumanInteraction RemotePressedOffButton) - ((<>) (HumanInteraction RemotePressedOnButton)) + ((=) (HumanInteraction RemotePressedOnButton)) |> Arb.fromGen |> Prop.forAll <| fun interactions ->