Update CLI's tests following introduction of spring-jcl module

The new spring-jcl module is now a dependency of spring-core. This
commit updates the CLI's dependency resolution-related tests to
account for the new dependency.
This commit is contained in:
Andy Wilkinson 2017-05-04 09:27:54 +01:00
parent 5247fa323b
commit acda8e647b
2 changed files with 6 additions and 5 deletions

View File

@ -111,9 +111,10 @@ public class GroovyGrabDependencyResolverTests {
@SuppressWarnings({ "unchecked", "rawtypes" })
public void resolveShorthandArtifactWithDependencies() throws Exception {
List<File> resolved = this.resolver.resolve(Arrays.asList("spring-beans"));
assertThat(resolved).hasSize(2);
assertThat(getNames(resolved)).has((Condition) Matched
.by(hasItems(startsWith("spring-core-"), startsWith("spring-beans-"))));
assertThat(resolved).hasSize(3);
assertThat(getNames(resolved))
.has((Condition) Matched.by(hasItems(startsWith("spring-core-"),
startsWith("spring-beans-"), startsWith("spring-jcl-"))));
}
@Test

View File

@ -67,7 +67,7 @@ public class AetherGrapeEngineTests {
Map<String, Object> args = new HashMap<>();
createGrapeEngine(this.springMilestones).grab(args,
createDependency("org.springframework", "spring-jdbc", null));
assertThat(this.groovyClassLoader.getURLs()).hasSize(4);
assertThat(this.groovyClassLoader.getURLs()).hasSize(5);
}
@Test
@ -156,7 +156,7 @@ public class AetherGrapeEngineTests {
createDependency("org.springframework", "spring-jdbc", null));
assertThat(this.groovyClassLoader.getURLs().length).isEqualTo(0);
assertThat(customClassLoader.getURLs().length).isEqualTo(4);
assertThat(customClassLoader.getURLs().length).isEqualTo(5);
}
@Test