From 8caafd6d0179da6f76b39bc60cd64993eb16e6c5 Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Sun, 1 Sep 2024 21:51:39 +0200 Subject: [PATCH] Fix assertions in DependencyResolverTest --- .../base/srctests/utility/DependencyResolverTest.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/base/src/test/java/de/staropensource/sosengine/base/srctests/utility/DependencyResolverTest.java b/base/src/test/java/de/staropensource/sosengine/base/srctests/utility/DependencyResolverTest.java index e3d9041..906c285 100644 --- a/base/src/test/java/de/staropensource/sosengine/base/srctests/utility/DependencyResolverTest.java +++ b/base/src/test/java/de/staropensource/sosengine/base/srctests/utility/DependencyResolverTest.java @@ -19,7 +19,6 @@ package de.staropensource.sosengine.base.srctests.utility; -import de.staropensource.sosengine.base.Engine; import de.staropensource.sosengine.base.exception.dependency.UnmetDependenciesException; import de.staropensource.sosengine.base.implementation.versioning.OneNumberVersioningSystem; import de.staropensource.sosengine.base.srctests.TestBase; @@ -33,7 +32,7 @@ import org.junit.jupiter.params.provider.ValueSource; import java.util.HashSet; import java.util.Set; -import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertEquals; /** * Tests the class {@link DependencyResolver}. @@ -270,6 +269,8 @@ class DependencyResolverTest extends TestBase { getLogger().error("Dependency resolution failed: Unmet dependencies found:"); for (DependencyVector vector : exception.getUnmetDependencies().keySet()) getLogger().error("-> " + vector.getIdentifier() + "=" + vector.getVersion() + ": " + exception.getUnmetDependencies().get(vector)); + + assertEquals("Please ignore this, this just exists to trigger an error", "", "Dependency resolution failed (layers=" + layers + "): See logs"); } } @@ -489,6 +490,6 @@ class DependencyResolverTest extends TestBase { return; } - assertNotNull(Engine.getInstance(), "Dependency resolution succeeded (layers=" + layers + ")"); + assertEquals("Please ignore this, this just exists to trigger an error", "", "Dependency resolution succeeded (layers=" + layers + ")"); } }