diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/support/CglibSubclassingInstantiationStrategyTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/support/CglibSubclassingInstantiationStrategyTests.java index d5b6ad2dffa..d826a54eba2 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/support/CglibSubclassingInstantiationStrategyTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/support/CglibSubclassingInstantiationStrategyTests.java @@ -25,8 +25,8 @@ import org.assertj.core.api.ThrowableAssert.ThrowingCallable; import org.jspecify.annotations.Nullable; import org.junit.jupiter.api.Test; +import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalStateException; -import static org.assertj.core.api.AssertionsForClassTypes.assertThat; /** * Tests for {@link CglibSubclassingInstantiationStrategy}. diff --git a/spring-context/src/test/java/org/springframework/cache/annotation/ReactiveCachingTests.java b/spring-context/src/test/java/org/springframework/cache/annotation/ReactiveCachingTests.java index 555f7c2ea8e..02620a8572a 100644 --- a/spring-context/src/test/java/org/springframework/cache/annotation/ReactiveCachingTests.java +++ b/spring-context/src/test/java/org/springframework/cache/annotation/ReactiveCachingTests.java @@ -43,7 +43,7 @@ import org.springframework.context.annotation.Configuration; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; -import static org.assertj.core.api.AssertionsForClassTypes.catchThrowable; +import static org.assertj.core.api.Assertions.catchThrowable; /** * Tests for annotation-based caching methods that use reactive operators. diff --git a/spring-core/src/test/java/org/springframework/core/serializer/SerializerTests.java b/spring-core/src/test/java/org/springframework/core/serializer/SerializerTests.java index f26f9b5b7b8..c39a85e371b 100644 --- a/spring-core/src/test/java/org/springframework/core/serializer/SerializerTests.java +++ b/spring-core/src/test/java/org/springframework/core/serializer/SerializerTests.java @@ -25,7 +25,7 @@ import org.junit.jupiter.api.Test; import org.springframework.core.serializer.support.SerializationDelegate; -import static org.assertj.core.api.AssertionsForClassTypes.assertThat; +import static org.assertj.core.api.Assertions.assertThat; /** * Tests for {@link Serializer}, {@link Deserializer}, and {@link SerializationDelegate}. diff --git a/spring-test/src/test/java/org/springframework/test/context/support/BootstrapTestUtilsMergedConfigTests.java b/spring-test/src/test/java/org/springframework/test/context/support/BootstrapTestUtilsMergedConfigTests.java index 6345184bbbe..1ff80f1f320 100644 --- a/spring-test/src/test/java/org/springframework/test/context/support/BootstrapTestUtilsMergedConfigTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/support/BootstrapTestUtilsMergedConfigTests.java @@ -21,7 +21,6 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -import org.assertj.core.api.AssertionsForClassTypes; import org.junit.jupiter.api.Test; import org.springframework.context.annotation.Configuration; @@ -271,10 +270,7 @@ class BootstrapTestUtilsMergedConfigTests extends AbstractContextConfigurationUt MergedContextConfiguration parent = mergedConfig.getParent(); assertThat(parent).as("parent config").isNotNull(); - // The following does not work -- at least not in Eclipse. - // assertThat(parent.getClasses())... - // So we use AssertionsForClassTypes directly. - AssertionsForClassTypes.assertThat(parent.getClasses()).containsExactly(FooConfig.class); + assertThat(parent.getClasses()).containsExactly(FooConfig.class); assertMergedConfig(mergedConfig, testClass, EMPTY_STRING_ARRAY, expectedClasses, AnnotationConfigContextLoader.class); @@ -294,7 +290,7 @@ class BootstrapTestUtilsMergedConfigTests extends AbstractContextConfigurationUt MergedContextConfiguration parent = mergedConfig.getParent(); assertThat(parent).as("parent config").isNotNull(); - AssertionsForClassTypes.assertThat(parent.getClasses()).containsExactly(FooConfig.class); + assertThat(parent.getClasses()).containsExactly(FooConfig.class); assertMergedConfig(mergedConfig, enclosingTestClass, EMPTY_STRING_ARRAY, expectedClasses, AnnotationConfigContextLoader.class); @@ -313,7 +309,7 @@ class BootstrapTestUtilsMergedConfigTests extends AbstractContextConfigurationUt MergedContextConfiguration parent = mergedConfig.getParent(); assertThat(parent).as("parent config").isNotNull(); - AssertionsForClassTypes.assertThat(parent.getClasses()).containsExactly(FooConfig.class); + assertThat(parent.getClasses()).containsExactly(FooConfig.class); assertMergedConfig(mergedConfig, testClass, EMPTY_STRING_ARRAY, expectedClasses, AnnotationConfigContextLoader.class); diff --git a/spring-tx/src/test/java/org/springframework/transaction/annotation/EnableTransactionManagementTests.java b/spring-tx/src/test/java/org/springframework/transaction/annotation/EnableTransactionManagementTests.java index b3849246c07..64349056159 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/annotation/EnableTransactionManagementTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/annotation/EnableTransactionManagementTests.java @@ -48,7 +48,7 @@ import org.springframework.transaction.testfixture.CallCountingTransactionManage import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatException; -import static org.assertj.core.api.AssertionsForClassTypes.assertThatExceptionOfType; +import static org.assertj.core.api.Assertions.assertThatExceptionOfType; import static org.springframework.transaction.annotation.RollbackOn.ALL_EXCEPTIONS; /** diff --git a/spring-web/src/test/java/org/springframework/core/convert/support/IntegerToEnumConverterFactoryTests.java b/spring-web/src/test/java/org/springframework/core/convert/support/IntegerToEnumConverterFactoryTests.java index 187e96881d4..89f42943a23 100644 --- a/spring-web/src/test/java/org/springframework/core/convert/support/IntegerToEnumConverterFactoryTests.java +++ b/spring-web/src/test/java/org/springframework/core/convert/support/IntegerToEnumConverterFactoryTests.java @@ -23,7 +23,7 @@ import org.junit.jupiter.params.provider.CsvSource; import org.springframework.core.convert.converter.Converter; import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.AssertionsForClassTypes.assertThatExceptionOfType; +import static org.assertj.core.api.Assertions.assertThatExceptionOfType; /** * Tests for {@link IntegerToEnumConverterFactory}. diff --git a/spring-web/src/test/java/org/springframework/web/accept/DefaultApiVersionStrategiesTests.java b/spring-web/src/test/java/org/springframework/web/accept/DefaultApiVersionStrategiesTests.java index 900fdbe06c0..a1d478bce03 100644 --- a/spring-web/src/test/java/org/springframework/web/accept/DefaultApiVersionStrategiesTests.java +++ b/spring-web/src/test/java/org/springframework/web/accept/DefaultApiVersionStrategiesTests.java @@ -23,8 +23,8 @@ import org.junit.jupiter.api.Test; import org.springframework.web.testfixture.servlet.MockHttpServletRequest; -import static org.assertj.core.api.AssertionsForClassTypes.assertThat; -import static org.assertj.core.api.AssertionsForClassTypes.assertThatThrownBy; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatThrownBy; /** * Unit tests for {@link DefaultApiVersionStrategy}. diff --git a/spring-web/src/test/java/org/springframework/web/accept/PathApiVersionResolverTests.java b/spring-web/src/test/java/org/springframework/web/accept/PathApiVersionResolverTests.java index 34631ffa7dc..7b2934addda 100644 --- a/spring-web/src/test/java/org/springframework/web/accept/PathApiVersionResolverTests.java +++ b/spring-web/src/test/java/org/springframework/web/accept/PathApiVersionResolverTests.java @@ -21,7 +21,7 @@ import org.junit.jupiter.api.Test; import org.springframework.web.testfixture.servlet.MockHttpServletRequest; import org.springframework.web.util.ServletRequestPathUtils; -import static org.assertj.core.api.AssertionsForClassTypes.assertThat; +import static org.assertj.core.api.Assertions.assertThat; /** * Unit tests for {@link PathApiVersionResolver}. diff --git a/spring-web/src/test/java/org/springframework/web/accept/SemanticApiVersionParserTests.java b/spring-web/src/test/java/org/springframework/web/accept/SemanticApiVersionParserTests.java index 11b1f2ee809..11e1431e1a7 100644 --- a/spring-web/src/test/java/org/springframework/web/accept/SemanticApiVersionParserTests.java +++ b/spring-web/src/test/java/org/springframework/web/accept/SemanticApiVersionParserTests.java @@ -20,8 +20,8 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.ValueSource; +import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalStateException; -import static org.assertj.core.api.AssertionsForClassTypes.assertThat; /** * Unit tests for {@link SemanticApiVersionParser}. diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/accept/DefaultApiVersionStrategiesTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/accept/DefaultApiVersionStrategiesTests.java index 504d6f55d49..297d632f183 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/accept/DefaultApiVersionStrategiesTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/accept/DefaultApiVersionStrategiesTests.java @@ -27,8 +27,8 @@ import org.springframework.web.server.ServerWebExchange; import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; import org.springframework.web.testfixture.server.MockServerWebExchange; -import static org.assertj.core.api.AssertionsForClassTypes.assertThat; -import static org.assertj.core.api.AssertionsForClassTypes.assertThatThrownBy; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatThrownBy; /** * Unit tests for {@link org.springframework.web.accept.DefaultApiVersionStrategy}. diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/accept/PathApiVersionResolverTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/accept/PathApiVersionResolverTests.java index b6665e4cf32..062a4906918 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/accept/PathApiVersionResolverTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/accept/PathApiVersionResolverTests.java @@ -22,7 +22,7 @@ import org.springframework.web.server.ServerWebExchange; import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; import org.springframework.web.testfixture.server.MockServerWebExchange; -import static org.assertj.core.api.AssertionsForClassTypes.assertThat; +import static org.assertj.core.api.Assertions.assertThat; /** * Unit tests for {@link org.springframework.web.accept.PathApiVersionResolver}. diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/condition/VersionRequestConditionTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/condition/VersionRequestConditionTests.java index e5b6cdc9b4d..cc7e7c89292 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/condition/VersionRequestConditionTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/condition/VersionRequestConditionTests.java @@ -30,8 +30,8 @@ import org.springframework.web.server.ServerWebExchange; import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; import org.springframework.web.testfixture.server.MockServerWebExchange; -import static org.assertj.core.api.AssertionsForClassTypes.assertThat; -import static org.assertj.core.api.AssertionsForClassTypes.assertThatThrownBy; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatThrownBy; /** * Unit tests for {@link VersionRequestCondition}. diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/FragmentViewResolutionResultHandlerTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/FragmentViewResolutionResultHandlerTests.java index 8086168b84f..102e5101098 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/FragmentViewResolutionResultHandlerTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/FragmentViewResolutionResultHandlerTests.java @@ -47,7 +47,7 @@ import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRe import org.springframework.web.testfixture.http.server.reactive.MockServerHttpResponse; import org.springframework.web.testfixture.server.MockServerWebExchange; -import static org.assertj.core.api.AssertionsForClassTypes.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.web.testfixture.method.ResolvableMethod.on; /** diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/socket/server/upgrade/ReactorNettyRequestUpgradeStrategyTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/socket/server/upgrade/ReactorNettyRequestUpgradeStrategyTests.java index 9ae91280e38..f6dfb90ba97 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/socket/server/upgrade/ReactorNettyRequestUpgradeStrategyTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/socket/server/upgrade/ReactorNettyRequestUpgradeStrategyTests.java @@ -19,7 +19,7 @@ package org.springframework.web.reactive.socket.server.upgrade; import org.junit.jupiter.api.Test; import reactor.netty.http.server.WebsocketServerSpec; -import static org.assertj.core.api.AssertionsForClassTypes.assertThat; +import static org.assertj.core.api.Assertions.assertThat; /** * Tests for {@link ReactorNettyRequestUpgradeStrategy}. diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/condition/VersionRequestConditionTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/condition/VersionRequestConditionTests.java index 4ed634038ef..b701bf1e514 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/condition/VersionRequestConditionTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/condition/VersionRequestConditionTests.java @@ -28,8 +28,8 @@ import org.springframework.web.accept.NotAcceptableApiVersionException; import org.springframework.web.accept.SemanticApiVersionParser; import org.springframework.web.testfixture.servlet.MockHttpServletRequest; -import static org.assertj.core.api.AssertionsForClassTypes.assertThat; -import static org.assertj.core.api.AssertionsForClassTypes.assertThatThrownBy; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatThrownBy; /** * Unit tests for {@link VersionRequestCondition}. diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingVersionHandlerMethodTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingVersionHandlerMethodTests.java index 15dea79a605..dc1b0140715 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingVersionHandlerMethodTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingVersionHandlerMethodTests.java @@ -33,7 +33,7 @@ import org.springframework.web.testfixture.servlet.MockHttpServletRequest; import org.springframework.web.testfixture.servlet.MockHttpServletResponse; import org.springframework.web.testfixture.servlet.MockServletConfig; -import static org.assertj.core.api.AssertionsForClassTypes.assertThat; +import static org.assertj.core.api.Assertions.assertThat; /** * Integration tests for API versioning.