Fix DependencyResolver tests

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