From 121c427d0a9ad04a5f4af02f55627204dd78ee43 Mon Sep 17 00:00:00 2001 From: Jinhong <139559460+Flowers2Algernon@users.noreply.github.com> Date: Fri, 30 Aug 2024 16:13:34 +0800 Subject: [PATCH] fix: replace AssertJ's deprecated asList() DSL method in QuarkusGeneratorExposedPortsTest (3350) --- .../generator/QuarkusGeneratorExposedPortsTest.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/jkube-kit/jkube-kit-quarkus/src/test/java/org/eclipse/jkube/quarkus/generator/QuarkusGeneratorExposedPortsTest.java b/jkube-kit/jkube-kit-quarkus/src/test/java/org/eclipse/jkube/quarkus/generator/QuarkusGeneratorExposedPortsTest.java index a195a33b0b..b3c54e1892 100644 --- a/jkube-kit/jkube-kit-quarkus/src/test/java/org/eclipse/jkube/quarkus/generator/QuarkusGeneratorExposedPortsTest.java +++ b/jkube-kit/jkube-kit-quarkus/src/test/java/org/eclipse/jkube/quarkus/generator/QuarkusGeneratorExposedPortsTest.java @@ -21,6 +21,7 @@ import java.util.List; import java.util.Properties; +import org.assertj.core.api.InstanceOfAssertFactories; import org.eclipse.jkube.generator.api.GeneratorContext; import org.eclipse.jkube.kit.common.JavaProject; import org.eclipse.jkube.kit.common.KitLogger; @@ -69,7 +70,7 @@ void withDefaults_shouldAddDefaults() throws IOException { assertThat(result).singleElement() .extracting(ImageConfiguration::getBuildConfiguration) .extracting(BuildConfiguration::getPorts) - .asList() + .asInstanceOf(InstanceOfAssertFactories.list(String.class)) .containsExactly("8080", "8778", "9779"); } @@ -83,7 +84,7 @@ void withDefaultsInNative_shouldAddDefaultsForNative() throws IOException { assertThat(result).singleElement() .extracting(ImageConfiguration::getBuildConfiguration) .extracting(BuildConfiguration::getPorts) - .asList() + .asInstanceOf(InstanceOfAssertFactories.list(String.class)) .containsExactly("8080"); } @@ -101,7 +102,7 @@ void withApplicationProperties_shouldAddConfigured() throws IOException { assertThat(result).singleElement() .extracting(ImageConfiguration::getBuildConfiguration) .extracting(BuildConfiguration::getPorts) - .asList() + .asInstanceOf(InstanceOfAssertFactories.list(String.class)) .containsExactly("1337", "8778", "9779"); } @@ -120,7 +121,7 @@ void withApplicationPropertiesAndProfile_shouldAddConfiguredProfile() throws IOE assertThat(result).singleElement() .extracting(ImageConfiguration::getBuildConfiguration) .extracting(BuildConfiguration::getPorts) - .asList() + .asInstanceOf(InstanceOfAssertFactories.list(String.class)) .containsExactly("31337", "8778", "9779"); }