From acda8e647b93e2986c31df7380e723ded849d813 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Thu, 4 May 2017 09:27:54 +0100 Subject: [PATCH] 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. --- .../command/install/GroovyGrabDependencyResolverTests.java | 7 ++++--- .../boot/cli/compiler/grape/AetherGrapeEngineTests.java | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/spring-boot-cli/src/test/java/org/springframework/boot/cli/command/install/GroovyGrabDependencyResolverTests.java b/spring-boot-cli/src/test/java/org/springframework/boot/cli/command/install/GroovyGrabDependencyResolverTests.java index 79760c550e..a1050b337f 100644 --- a/spring-boot-cli/src/test/java/org/springframework/boot/cli/command/install/GroovyGrabDependencyResolverTests.java +++ b/spring-boot-cli/src/test/java/org/springframework/boot/cli/command/install/GroovyGrabDependencyResolverTests.java @@ -111,9 +111,10 @@ public class GroovyGrabDependencyResolverTests { @SuppressWarnings({ "unchecked", "rawtypes" }) public void resolveShorthandArtifactWithDependencies() throws Exception { List 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 diff --git a/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/grape/AetherGrapeEngineTests.java b/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/grape/AetherGrapeEngineTests.java index 5776448475..543102fed2 100644 --- a/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/grape/AetherGrapeEngineTests.java +++ b/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/grape/AetherGrapeEngineTests.java @@ -67,7 +67,7 @@ public class AetherGrapeEngineTests { Map 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