From ec90147c075b453cca33a9b9f8d46444f42924d2 Mon Sep 17 00:00:00 2001 From: Sven van Heugten Date: Fri, 16 Jan 2026 22:51:06 +0100 Subject: [PATCH] Simplify classify by using collect --- NightLight.Core.Tests/NightLightTests.fs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/NightLight.Core.Tests/NightLightTests.fs b/NightLight.Core.Tests/NightLightTests.fs index c76ee9c..8529f1c 100644 --- a/NightLight.Core.Tests/NightLightTests.fs +++ b/NightLight.Core.Tests/NightLightTests.fs @@ -37,10 +37,9 @@ type NightLightTests() = match partOfDay with | Day -> color = White || color = Yellow | Night -> color = Red) - |> Prop.classify (partOfDay = Day) "day" - |> Prop.classify (partOfDay = Night) "night" - |> Prop.trivial (fakeHome.LightsThatAreOn.Length = 0) + |> Prop.collect partOfDay |> Prop.collect $"{fakeHome.LightsThatAreOn.Length} light(s) on" + |> Prop.trivial (fakeHome.LightsThatAreOn.Length = 0) [ |])>] let ``All non-remotely controlled lights that have power should be on`` (interactions: Interaction list) =