Fix DependencyResolver tests
All checks were successful
build-and-test / test (push) Successful in 1m37s
build-and-test / build (push) Successful in 1m41s
build-and-test / generate-javadoc (push) Successful in 1m42s

This commit is contained in:
JeremyStar™ 2024-09-04 17:04:19 +02:00
parent 6c3c449416
commit 9b97390a9c
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D

View file

@ -94,6 +94,7 @@ class DependencyResolverTest extends TestBase {
// Vector 2 // Vector 2
dependencies = new HashSet<>(); dependencies = new HashSet<>();
dependencies.add("test0=49"); dependencies.add("test0=49");
dependencies.add("test1=999");
vectors.add( vectors.add(
new DependencyVector.Builder() new DependencyVector.Builder()
.setIdentifier("test2") .setIdentifier("test2")
@ -164,7 +165,7 @@ class DependencyResolverTest extends TestBase {
.build() .build()
); );
// Vector 5 // Vector 5
dependencies.add("test4>998<100"); dependencies.add("test4>998<1000");
vectors.add( vectors.add(
new DependencyVector.Builder() new DependencyVector.Builder()
.setIdentifier("test5") .setIdentifier("test5")
@ -235,8 +236,8 @@ class DependencyResolverTest extends TestBase {
.setDependencies(dependencies) .setDependencies(dependencies)
.build() .build()
); );
// Vector 6 // Vector 6p
dependencies.add("test5>998<100"); dependencies.add("test5>998<1000");
vectors.add( vectors.add(
new DependencyVector.Builder() new DependencyVector.Builder()
.setIdentifier("test6") .setIdentifier("test6")
@ -266,7 +267,7 @@ class DependencyResolverTest extends TestBase {
try { try {
resolver.resolve(); resolver.resolve();
} catch (UnmetDependenciesException exception) { } catch (UnmetDependenciesException exception) {
getLogger().error("Dependency resolution failed: Unmet dependencies found:"); getLogger().error("Dependency resolution failed:");
for (DependencyVector vector : exception.getUnmetDependencies().keySet()) for (DependencyVector vector : exception.getUnmetDependencies().keySet())
getLogger().error("-> " + vector.getIdentifier() + "=" + vector.getVersion() + ": " + exception.getUnmetDependencies().get(vector)); getLogger().error("-> " + vector.getIdentifier() + "=" + vector.getVersion() + ": " + exception.getUnmetDependencies().get(vector));
@ -351,6 +352,7 @@ class DependencyResolverTest extends TestBase {
); );
// Vector 2 // Vector 2
dependencies = new HashSet<>(); dependencies = new HashSet<>();
dependencies.add("testNULL");
dependencies.add("test1>999"); dependencies.add("test1>999");
vectors.add( vectors.add(
new DependencyVector.Builder() new DependencyVector.Builder()
@ -483,7 +485,7 @@ class DependencyResolverTest extends TestBase {
try { try {
resolver.resolve(); resolver.resolve();
} catch (UnmetDependenciesException exception) { } catch (UnmetDependenciesException exception) {
getLogger().error("Dependency resolution failed (great!): Unmet dependencies found:"); getLogger().error("Dependency resolution failed (great!):");
for (DependencyVector vector : exception.getUnmetDependencies().keySet()) for (DependencyVector vector : exception.getUnmetDependencies().keySet())
getLogger().error("-> " + vector.getIdentifier() + "=" + vector.getVersion() + ": " + exception.getUnmetDependencies().get(vector)); getLogger().error("-> " + vector.getIdentifier() + "=" + vector.getVersion() + ": " + exception.getUnmetDependencies().get(vector));