diff --git a/endtoend-testing/src/main/java/de/jplag/endtoend/constants/TestDirectoryConstants.java b/endtoend-testing/src/main/java/de/jplag/endtoend/constants/TestDirectoryConstants.java index b3fca943c..d1f21c0f9 100644 --- a/endtoend-testing/src/main/java/de/jplag/endtoend/constants/TestDirectoryConstants.java +++ b/endtoend-testing/src/main/java/de/jplag/endtoend/constants/TestDirectoryConstants.java @@ -12,17 +12,17 @@ private TestDirectoryConstants() { } /** - * Base path to the saved results + * Base path to the resources directory */ - public static final Path BASE_PATH_TO_RESULT_JSON = Path.of("src", "test", "resources", "results"); + public static final Path BASE_PATH_TO_RESOURCES = Path.of("src", "test", "resources"); /** - * Base path to the data set descriptors + * Base path to the saved results */ - public static final Path BASE_PATH_TO_DATA_SET_DESCRIPTORS = Path.of("src", "test", "resources", "dataSets"); + public static final Path BASE_PATH_TO_RESULT_JSON = BASE_PATH_TO_RESOURCES.resolve(Path.of("results")); /** - * Base path to the resources directory + * Base path to the data set descriptors */ - public static final Path BASE_PATH_TO_RESOURCES = Path.of("src", "test", "resources"); + public static final Path BASE_PATH_TO_DATA_SET_DESCRIPTORS = BASE_PATH_TO_RESOURCES.resolve(Path.of("dataSets")); } diff --git a/endtoend-testing/src/main/java/de/jplag/endtoend/model/Options.java b/endtoend-testing/src/main/java/de/jplag/endtoend/model/Options.java index 861097f2d..75bfdd3af 100644 --- a/endtoend-testing/src/main/java/de/jplag/endtoend/model/Options.java +++ b/endtoend-testing/src/main/java/de/jplag/endtoend/model/Options.java @@ -1,5 +1,8 @@ package de.jplag.endtoend.model; +import java.util.Arrays; +import java.util.Objects; + import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -27,4 +30,26 @@ public int[] getMinimumTokenMatches() { return values; } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + if (o == null || getClass() != o.getClass()) + return false; + Options options = (Options) o; + return Arrays.equals(minimumTokenMatches, options.minimumTokenMatches) && Objects.equals(baseCodeDirectory, options.baseCodeDirectory); + } + + @Override + public int hashCode() { + int result = Objects.hash(baseCodeDirectory); + result = 31 * result + Arrays.hashCode(minimumTokenMatches); + return result; + } + + @Override + public String toString() { + return "Options{" + "minimumTokenMatches=" + Arrays.toString(minimumTokenMatches) + ", baseCodeDirectory='" + baseCodeDirectory + '\'' + '}'; + } }