From 0b6c147a8751a71aed2fcc7af8a8ec2c2d1c7ca6 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Mon, 30 May 2022 19:22:30 +0100 Subject: [PATCH] Polish --- .../boot/gradle/tasks/bundling/AbstractBootArchiveTests.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/AbstractBootArchiveTests.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/AbstractBootArchiveTests.java index e5cced6a17..442135eb95 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/AbstractBootArchiveTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/AbstractBootArchiveTests.java @@ -49,6 +49,7 @@ import org.gradle.api.DomainObjectSet; import org.gradle.api.Project; import org.gradle.api.artifacts.Configuration; import org.gradle.api.artifacts.DependencySet; +import org.gradle.api.artifacts.LenientConfiguration; import org.gradle.api.artifacts.ModuleVersionIdentifier; import org.gradle.api.artifacts.ProjectDependency; import org.gradle.api.artifacts.ResolvableDependencies; @@ -663,7 +664,9 @@ abstract class AbstractBootArchiveTests { artifacts.add(mockProjectArtifact("second-project-library-SNAPSHOT.jar", "com.example", "second-project-library", "1.0.0.SNAPSHOT")); ResolvedConfiguration resolvedConfiguration = mock(ResolvedConfiguration.class); - given(resolvedConfiguration.getResolvedArtifacts()).willReturn(artifacts); + LenientConfiguration lenientConfiguration = mock(LenientConfiguration.class); + given(resolvedConfiguration.getLenientConfiguration()).willReturn(lenientConfiguration); + given(lenientConfiguration.getArtifacts()).willReturn(artifacts); Configuration configuration = mock(Configuration.class); given(configuration.getResolvedConfiguration()).willReturn(resolvedConfiguration); ResolvableDependencies resolvableDependencies = mock(ResolvableDependencies.class);