diff --git a/jkube-kit/jkube-kit-quarkus/src/test/java/org/eclipse/jkube/quarkus/generator/QuarkusGeneratorTest.java b/jkube-kit/jkube-kit-quarkus/src/test/java/org/eclipse/jkube/quarkus/generator/QuarkusGeneratorTest.java index ed3298e912..aad82f905e 100644 --- a/jkube-kit/jkube-kit-quarkus/src/test/java/org/eclipse/jkube/quarkus/generator/QuarkusGeneratorTest.java +++ b/jkube-kit/jkube-kit-quarkus/src/test/java/org/eclipse/jkube/quarkus/generator/QuarkusGeneratorTest.java @@ -307,21 +307,21 @@ void withFastJarInTarget_shouldReturnFastJarAssemblyInImage() throws IOException .hasFieldOrPropertyWithValue("targetDir", "/deployments") .hasFieldOrPropertyWithValue("excludeFinalOutputArtifact", true) .extracting(AssemblyConfiguration::getLayers) - .asList().hasSize(2) + .asInstanceOf(InstanceOfAssertFactories.list(Assembly.class)).hasSize(2) .satisfies(layers -> assertThat(layers).first().asInstanceOf(InstanceOfAssertFactories.type(Assembly.class)) .hasFieldOrPropertyWithValue("id", "lib") .extracting(Assembly::getFileSets) - .asList().singleElement() + .asInstanceOf(InstanceOfAssertFactories.list(Assembly.class)).singleElement() .hasFieldOrPropertyWithValue("outputDirectory", new File(".")) - .extracting("includes").asList() + .extracting("includes").asInstanceOf(InstanceOfAssertFactories.list(String.class)) .containsExactly("lib")) .satisfies(layers -> assertThat(layers).element(1).asInstanceOf(InstanceOfAssertFactories.type(Assembly.class)) .hasFieldOrPropertyWithValue("id", "fast-jar") .extracting(Assembly::getFileSets) - .asList().singleElement() + .asInstanceOf(InstanceOfAssertFactories.list(Assembly.class)).singleElement() .hasFieldOrPropertyWithValue("outputDirectory", new File(".")) .hasFieldOrPropertyWithValue("excludes", Arrays.asList("lib/**/*", "lib/*")) - .extracting("includes").asList() + .extracting("includes").asInstanceOf(InstanceOfAssertFactories.list(String.class)) .containsExactly("quarkus-run.jar", "*", "**/*")); } @@ -345,9 +345,9 @@ void manualNativeSettings_shouldReturnNativeAssemblyInImage() throws IOException .extracting(BuildConfiguration::getAssembly) .hasFieldOrPropertyWithValue("targetDir", "/") .extracting(AssemblyConfiguration::getLayers) - .asList().singleElement().asInstanceOf(InstanceOfAssertFactories.type(Assembly.class)) + .asInstanceOf(InstanceOfAssertFactories.list(Assembly.class)).singleElement().asInstanceOf(InstanceOfAssertFactories.type(Assembly.class)) .extracting(Assembly::getFileSets) - .asList() + .asInstanceOf(InstanceOfAssertFactories.list(Assembly.class)) .hasSize(1) .flatExtracting("includes") .containsExactly("sample-runner"); @@ -368,9 +368,9 @@ void withNativeBinaryInTarget_shouldReturnNativeAssemblyInImage() throws IOExcep .extracting(BuildConfiguration::getAssembly) .hasFieldOrPropertyWithValue("targetDir", "/") .extracting(AssemblyConfiguration::getLayers) - .asList().singleElement().asInstanceOf(InstanceOfAssertFactories.type(Assembly.class)) + .asInstanceOf(InstanceOfAssertFactories.list(Assembly.class)).singleElement().asInstanceOf(InstanceOfAssertFactories.type(Assembly.class)) .extracting(Assembly::getFileSets) - .asList() + .asInstanceOf(InstanceOfAssertFactories.list(Assembly.class)) .hasSize(1) .flatExtracting("includes") .containsExactly("sample-runner"); @@ -393,18 +393,18 @@ void withLegacyJarInTarget_shouldReturnDefaultAssemblyInImage() throws IOExcepti .hasFieldOrPropertyWithValue("targetDir", "/deployments") .hasFieldOrPropertyWithValue("excludeFinalOutputArtifact", true) .extracting(AssemblyConfiguration::getLayers) - .asList().hasSize(2) + .asInstanceOf(InstanceOfAssertFactories.list(Assembly.class)).hasSize(2) .satisfies(layers -> assertThat(layers).first().asInstanceOf(InstanceOfAssertFactories.type(Assembly.class)) .hasFieldOrPropertyWithValue("id", "lib") .extracting(Assembly::getFileSets) - .asList() + .asInstanceOf(InstanceOfAssertFactories.list(Assembly.class)) .hasSize(1) .flatExtracting("includes") .containsExactly("lib")) .satisfies(layers -> assertThat(layers).element(1).asInstanceOf(InstanceOfAssertFactories.type(Assembly.class)) .hasFieldOrPropertyWithValue("id", "artifact") .extracting(Assembly::getFileSets) - .asList() + .asInstanceOf(InstanceOfAssertFactories.list(Assembly.class)) .hasSize(1) .flatExtracting("includes") .containsExactly("sample-legacy-runner.jar")); @@ -439,9 +439,9 @@ void withUberJarInTarget_shouldReturnAssemblyWithSingleJar() throws IOException .extracting(BuildConfiguration::getAssembly) .hasFieldOrPropertyWithValue("targetDir", "/deployments") .extracting(AssemblyConfiguration::getLayers) - .asList().singleElement().asInstanceOf(InstanceOfAssertFactories.type(Assembly.class)) + .asInstanceOf(InstanceOfAssertFactories.list(Assembly.class)).singleElement().asInstanceOf(InstanceOfAssertFactories.type(Assembly.class)) .extracting(Assembly::getFileSets) - .asList() + .asInstanceOf(InstanceOfAssertFactories.list(Assembly.class)) .hasSize(1) .flatExtracting("includes") .containsExactly("sample-runner.jar"); @@ -465,21 +465,21 @@ void withManualConfigAndFastJarAndLegacyInTarget_shouldReturnAssemblyForQuarkusA .hasFieldOrPropertyWithValue("targetDir", "/deployments") .hasFieldOrPropertyWithValue("excludeFinalOutputArtifact", true) .extracting(AssemblyConfiguration::getLayers) - .asList().hasSize(2) + .asInstanceOf(InstanceOfAssertFactories.list(Assembly.class)).hasSize(2) .satisfies(layers -> assertThat(layers).first().asInstanceOf(InstanceOfAssertFactories.type(Assembly.class)) .hasFieldOrPropertyWithValue("id", "lib") .extracting(Assembly::getFileSets) - .asList().singleElement() + .asInstanceOf(InstanceOfAssertFactories.list(Assembly.class)).singleElement() .hasFieldOrPropertyWithValue("outputDirectory", new File(".")) - .extracting("includes").asList() + .extracting("includes").asInstanceOf(InstanceOfAssertFactories.list(String.class)) .containsExactly("lib")) .satisfies(layers -> assertThat(layers).element(1).asInstanceOf(InstanceOfAssertFactories.type(Assembly.class)) .hasFieldOrPropertyWithValue("id", "fast-jar") .extracting(Assembly::getFileSets) - .asList().singleElement() + .asInstanceOf(InstanceOfAssertFactories.list(Assembly.class)).singleElement() .hasFieldOrPropertyWithValue("outputDirectory", new File(".")) .hasFieldOrPropertyWithValue("excludes", Arrays.asList("lib/**/*", "lib/*")) - .extracting("includes").asList() + .extracting("includes").asInstanceOf(InstanceOfAssertFactories.list(String.class)) .containsExactly("quarkus-run.jar", "*", "**/*")); }