Use Gradle test fixture support for spring-core

See gh-23550
This commit is contained in:
Sam Brannen
2019-12-28 11:44:40 +01:00
parent 75fd391fc7
commit 5718bf424b
224 changed files with 552 additions and 453 deletions

View File

@@ -16,6 +16,8 @@ dependencies {
optional("com.google.protobuf:protobuf-java-util")
optional("org.jetbrains.kotlinx:kotlinx-coroutines-core")
optional("org.jetbrains.kotlinx:kotlinx-coroutines-reactor")
testCompile(project(":kotlin-coroutines"))
testCompile(testFixtures(project(":spring-core")))
testCompile("javax.inject:javax.inject-tck")
testCompile("javax.servlet:javax.servlet-api")
testCompile("javax.validation:validation-api")
@@ -29,7 +31,6 @@ dependencies {
testCompile("org.jetbrains.kotlin:kotlin-stdlib")
testCompile("org.xmlunit:xmlunit-assertj")
testCompile("org.xmlunit:xmlunit-matchers")
testCompile(project(":kotlin-coroutines"))
testRuntime("com.sun.xml.bind:jaxb-core")
testRuntime("com.sun.xml.bind:jaxb-impl")
testRuntime("com.sun.activation:javax.activation")

View File

@@ -25,7 +25,7 @@ import java.util.concurrent.atomic.AtomicLong;
import org.junit.jupiter.api.Test;
import org.springframework.util.SerializationTestUtils;
import org.springframework.core.test.fixtures.io.SerializationTestUtils;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;

View File

@@ -25,10 +25,10 @@ import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.xmlunit.diff.DifferenceEvaluator;
import org.springframework.core.test.fixtures.xml.XmlContent;
import org.springframework.messaging.Message;
import org.springframework.messaging.support.MessageBuilder;
import org.springframework.oxm.jaxb.Jaxb2Marshaller;
import org.springframework.tests.XmlContent;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;

View File

@@ -24,7 +24,7 @@ import org.springframework.core.MethodParameter;
import org.springframework.core.ReactiveAdapterRegistry;
import org.springframework.core.codec.Encoder;
import org.springframework.core.io.buffer.DataBuffer;
import org.springframework.core.io.buffer.support.DataBufferTestUtils;
import org.springframework.core.test.fixtures.io.buffer.DataBufferTestUtils;
import org.springframework.messaging.Message;
import static java.nio.charset.StandardCharsets.UTF_8;

View File

@@ -31,7 +31,7 @@ import org.springframework.core.io.buffer.PooledDataBuffer;
import org.springframework.util.ObjectUtils;
/**
* Unlike {@link org.springframework.core.io.buffer.LeakAwareDataBufferFactory}
* Unlike {@link org.springframework.core.test.fixtures.io.buffer.LeakAwareDataBufferFactory}
* this one is an instance of {@link NettyDataBufferFactory} which is necessary
* since {@link PayloadUtils} does instanceof checks, and that also allows
* intercepting {@link NettyDataBufferFactory#wrap(ByteBuf)}.

View File

@@ -33,7 +33,7 @@ import org.springframework.core.io.buffer.DataBuffer;
import org.springframework.core.io.buffer.DefaultDataBufferFactory;
import org.springframework.core.io.buffer.NettyDataBuffer;
import org.springframework.core.io.buffer.NettyDataBufferFactory;
import org.springframework.core.io.buffer.support.DataBufferTestUtils;
import org.springframework.core.test.fixtures.io.buffer.DataBufferTestUtils;
import org.springframework.util.MimeType;
import org.springframework.util.MimeTypeUtils;

View File

@@ -30,7 +30,7 @@ import org.springframework.core.io.buffer.DataBufferUtils;
import org.springframework.core.io.buffer.DefaultDataBuffer;
import org.springframework.core.io.buffer.DefaultDataBufferFactory;
import org.springframework.core.io.buffer.NettyDataBuffer;
import org.springframework.core.io.buffer.support.DataBufferTestUtils;
import org.springframework.core.test.fixtures.io.buffer.DataBufferTestUtils;
import static org.assertj.core.api.Assertions.assertThat;

View File

@@ -24,10 +24,10 @@ import java.util.UUID;
import org.junit.jupiter.api.Test;
import org.springframework.core.test.fixtures.io.SerializationTestUtils;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessageHeaders;
import org.springframework.util.MimeTypeUtils;
import org.springframework.util.SerializationTestUtils;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatIllegalStateException;