diff --git a/generator/src/main/java/com/scottlogic/deg/generator/generation/fieldvaluesources/LinearFieldValueSource.java b/generator/src/main/java/com/scottlogic/deg/generator/generation/fieldvaluesources/LinearFieldValueSource.java index 3b4346ff6..252d2b0be 100644 --- a/generator/src/main/java/com/scottlogic/deg/generator/generation/fieldvaluesources/LinearFieldValueSource.java +++ b/generator/src/main/java/com/scottlogic/deg/generator/generation/fieldvaluesources/LinearFieldValueSource.java @@ -58,7 +58,7 @@ public Stream generateRandomValues(RandomNumberGenerator randomNumberGenerato .filter(this::notInBlacklist); } - + // we call this instead of .contains because .contains doesn't treat 2 and 2.0 as equal private boolean notInBlacklist(T t) { return blacklist.stream().noneMatch(x->x.compareTo(t)==0); } diff --git a/generator/src/test/java/com/scottlogic/deg/generator/generation/fieldvaluesources/datetime/DateTimeFieldValueSourceTests.java b/generator/src/test/java/com/scottlogic/deg/generator/generation/fieldvaluesources/datetime/DateTimeFieldValueSourceTests.java index fefffcf33..ea41c9b4a 100644 --- a/generator/src/test/java/com/scottlogic/deg/generator/generation/fieldvaluesources/datetime/DateTimeFieldValueSourceTests.java +++ b/generator/src/test/java/com/scottlogic/deg/generator/generation/fieldvaluesources/datetime/DateTimeFieldValueSourceTests.java @@ -43,7 +43,7 @@ public class DateTimeFieldValueSourceTests { private Limit lowerLimit = DATETIME_MIN_LIMIT; private Limit upperLimit = DATETIME_MAX_LIMIT; private Set blackList = new HashSet<>(); - private LinearFieldValueSource fieldSource; + private LinearFieldValueSource fieldSource; @Test public void whenGeneratingUnboundSet() {