forked from StarOpenSource/Engine
Fix DependencyResolver tests
This commit is contained in:
parent
6c3c449416
commit
9b97390a9c
1 changed files with 7 additions and 5 deletions
|
@ -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));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue