From 56626536e152b689994fd1b0d420268d3177386f Mon Sep 17 00:00:00 2001 From: "Peter Fichtner (pfichtner)" Date: Wed, 4 Dec 2024 10:53:53 +0100 Subject: [PATCH] fixes for jqwik api changes --- .../smartfootballtable/cognition/DetectionExamples.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/test/java/com/github/smartfootballtable/cognition/DetectionExamples.java b/src/test/java/com/github/smartfootballtable/cognition/DetectionExamples.java index 6ccaa171..a458f053 100644 --- a/src/test/java/com/github/smartfootballtable/cognition/DetectionExamples.java +++ b/src/test/java/com/github/smartfootballtable/cognition/DetectionExamples.java @@ -469,15 +469,14 @@ public DurationSequence(Arbitrary base, Arbitrary between, Time @Override Arbitrary> build() { - return forDuration - .flatMap(minDuration -> base.collect(positions -> durationReached(positions, minDuration))); + return forDuration.flatMap(m -> base.collect(p -> durationReached(p, m))); } - private boolean durationReached(List positions, long minDuration) { + private boolean durationReached(List positions, long minDuration) { return positions.size() > 1 && duration(positions.stream().limit(positions.size() - 1)) >= minDuration; } - private long duration(Stream stream) { + private long duration(Stream stream) { return stream.mapToLong(OffsetPos::getOffset).sum(); }