diff --git a/spring-restdocs-core/build.gradle b/spring-restdocs-core/build.gradle index 8843ba42..3b67df29 100644 --- a/spring-restdocs-core/build.gradle +++ b/spring-restdocs-core/build.gradle @@ -1,6 +1,7 @@ plugins { id "io.spring.compatibility-test" version "0.0.1" id "java-library" + id "java-test-fixtures" id "maven-publish" id "optional-dependencies" } @@ -49,6 +50,15 @@ dependencies { optional("junit:junit") optional("org.hibernate.validator:hibernate-validator") optional("org.junit.jupiter:junit-jupiter-api") + + testFixturesApi(platform(project(":spring-restdocs-platform"))) + testFixturesApi("junit:junit") + testFixturesApi("org.assertj:assertj-core") + testFixturesApi("org.hamcrest:hamcrest-core") + testFixturesImplementation(files(jmustacheRepackJar)) + testFixturesImplementation("org.hamcrest:hamcrest-library") + testFixturesImplementation("org.springframework:spring-core") + testFixturesImplementation("org.springframework:spring-web") testImplementation("junit:junit") testImplementation("org.assertj:assertj-core") @@ -68,13 +78,12 @@ jar { } } -task testJar(type: Jar) { - classifier "test" - from sourceSets.test.output +components.java.withVariantsFromConfiguration(configurations.testFixturesApiElements) { + skip() } -artifacts { - testArtifacts testJar +components.java.withVariantsFromConfiguration(configurations.testFixturesRuntimeElements) { + skip() } compatibilityTest { diff --git a/spring-restdocs-core/src/test/java/org/springframework/restdocs/AbstractSnippetTests.java b/spring-restdocs-core/src/test/java/org/springframework/restdocs/AbstractSnippetTests.java index 0dabb13f..42ca747f 100644 --- a/spring-restdocs-core/src/test/java/org/springframework/restdocs/AbstractSnippetTests.java +++ b/spring-restdocs-core/src/test/java/org/springframework/restdocs/AbstractSnippetTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2019 the original author or authors. + * Copyright 2014-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,13 +28,13 @@ import org.springframework.core.io.FileSystemResource; import org.springframework.http.HttpStatus; import org.springframework.restdocs.templates.TemplateFormat; import org.springframework.restdocs.templates.TemplateFormats; -import org.springframework.restdocs.test.GeneratedSnippets; -import org.springframework.restdocs.test.OperationBuilder; -import org.springframework.restdocs.test.SnippetConditions; -import org.springframework.restdocs.test.SnippetConditions.CodeBlockCondition; -import org.springframework.restdocs.test.SnippetConditions.HttpRequestCondition; -import org.springframework.restdocs.test.SnippetConditions.HttpResponseCondition; -import org.springframework.restdocs.test.SnippetConditions.TableCondition; +import org.springframework.restdocs.testfixtures.GeneratedSnippets; +import org.springframework.restdocs.testfixtures.OperationBuilder; +import org.springframework.restdocs.testfixtures.SnippetConditions; +import org.springframework.restdocs.testfixtures.SnippetConditions.CodeBlockCondition; +import org.springframework.restdocs.testfixtures.SnippetConditions.HttpRequestCondition; +import org.springframework.restdocs.testfixtures.SnippetConditions.HttpResponseCondition; +import org.springframework.restdocs.testfixtures.SnippetConditions.TableCondition; import org.springframework.web.bind.annotation.RequestMethod; /** diff --git a/spring-restdocs-core/src/test/java/org/springframework/restdocs/headers/RequestHeadersSnippetFailureTests.java b/spring-restdocs-core/src/test/java/org/springframework/restdocs/headers/RequestHeadersSnippetFailureTests.java index 8390afbd..c6a5ee65 100644 --- a/spring-restdocs-core/src/test/java/org/springframework/restdocs/headers/RequestHeadersSnippetFailureTests.java +++ b/spring-restdocs-core/src/test/java/org/springframework/restdocs/headers/RequestHeadersSnippetFailureTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2019 the original author or authors. + * Copyright 2014-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ import org.junit.rules.ExpectedException; import org.springframework.restdocs.snippet.SnippetException; import org.springframework.restdocs.templates.TemplateFormats; -import org.springframework.restdocs.test.OperationBuilder; +import org.springframework.restdocs.testfixtures.OperationBuilder; import static org.hamcrest.CoreMatchers.endsWith; import static org.hamcrest.CoreMatchers.equalTo; diff --git a/spring-restdocs-core/src/test/java/org/springframework/restdocs/headers/ResponseHeadersSnippetFailureTests.java b/spring-restdocs-core/src/test/java/org/springframework/restdocs/headers/ResponseHeadersSnippetFailureTests.java index c436bdb0..7e44f079 100644 --- a/spring-restdocs-core/src/test/java/org/springframework/restdocs/headers/ResponseHeadersSnippetFailureTests.java +++ b/spring-restdocs-core/src/test/java/org/springframework/restdocs/headers/ResponseHeadersSnippetFailureTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2019 the original author or authors. + * Copyright 2014-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ import org.junit.rules.ExpectedException; import org.springframework.restdocs.snippet.SnippetException; import org.springframework.restdocs.templates.TemplateFormats; -import org.springframework.restdocs.test.OperationBuilder; +import org.springframework.restdocs.testfixtures.OperationBuilder; import static org.hamcrest.CoreMatchers.endsWith; import static org.hamcrest.CoreMatchers.equalTo; diff --git a/spring-restdocs-core/src/test/java/org/springframework/restdocs/hypermedia/LinksSnippetFailureTests.java b/spring-restdocs-core/src/test/java/org/springframework/restdocs/hypermedia/LinksSnippetFailureTests.java index cff432be..69796397 100644 --- a/spring-restdocs-core/src/test/java/org/springframework/restdocs/hypermedia/LinksSnippetFailureTests.java +++ b/spring-restdocs-core/src/test/java/org/springframework/restdocs/hypermedia/LinksSnippetFailureTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2019 the original author or authors. + * Copyright 2014-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ import org.junit.rules.ExpectedException; import org.springframework.restdocs.snippet.SnippetException; import org.springframework.restdocs.templates.TemplateFormats; -import org.springframework.restdocs.test.OperationBuilder; +import org.springframework.restdocs.testfixtures.OperationBuilder; import static org.hamcrest.CoreMatchers.equalTo; diff --git a/spring-restdocs-core/src/test/java/org/springframework/restdocs/operation/preprocess/PrettyPrintingContentModifierTests.java b/spring-restdocs-core/src/test/java/org/springframework/restdocs/operation/preprocess/PrettyPrintingContentModifierTests.java index f1cc0ac3..86e030d4 100644 --- a/spring-restdocs-core/src/test/java/org/springframework/restdocs/operation/preprocess/PrettyPrintingContentModifierTests.java +++ b/spring-restdocs-core/src/test/java/org/springframework/restdocs/operation/preprocess/PrettyPrintingContentModifierTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2019 the original author or authors. + * Copyright 2014-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,7 +23,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import org.junit.Rule; import org.junit.Test; -import org.springframework.restdocs.test.OutputCapture; +import org.springframework.restdocs.testfixtures.OutputCapture; import static org.assertj.core.api.Assertions.assertThat; import static org.hamcrest.Matchers.isEmptyString; diff --git a/spring-restdocs-core/src/test/java/org/springframework/restdocs/payload/AsciidoctorRequestFieldsSnippetTests.java b/spring-restdocs-core/src/test/java/org/springframework/restdocs/payload/AsciidoctorRequestFieldsSnippetTests.java index 08db8b3b..50b30d6b 100644 --- a/spring-restdocs-core/src/test/java/org/springframework/restdocs/payload/AsciidoctorRequestFieldsSnippetTests.java +++ b/spring-restdocs-core/src/test/java/org/springframework/restdocs/payload/AsciidoctorRequestFieldsSnippetTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2019 the original author or authors. + * Copyright 2014-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,9 +27,9 @@ import org.springframework.restdocs.templates.TemplateEngine; import org.springframework.restdocs.templates.TemplateFormats; import org.springframework.restdocs.templates.TemplateResourceResolver; import org.springframework.restdocs.templates.mustache.MustacheTemplateEngine; -import org.springframework.restdocs.test.GeneratedSnippets; -import org.springframework.restdocs.test.OperationBuilder; -import org.springframework.restdocs.test.SnippetConditions; +import org.springframework.restdocs.testfixtures.GeneratedSnippets; +import org.springframework.restdocs.testfixtures.OperationBuilder; +import org.springframework.restdocs.testfixtures.SnippetConditions; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.BDDMockito.given; diff --git a/spring-restdocs-core/src/test/java/org/springframework/restdocs/payload/RequestFieldsSnippetFailureTests.java b/spring-restdocs-core/src/test/java/org/springframework/restdocs/payload/RequestFieldsSnippetFailureTests.java index 827a6942..99d6ed5e 100644 --- a/spring-restdocs-core/src/test/java/org/springframework/restdocs/payload/RequestFieldsSnippetFailureTests.java +++ b/spring-restdocs-core/src/test/java/org/springframework/restdocs/payload/RequestFieldsSnippetFailureTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2019 the original author or authors. + * Copyright 2014-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,7 +28,7 @@ import org.springframework.http.HttpHeaders; import org.springframework.http.MediaType; import org.springframework.restdocs.snippet.SnippetException; import org.springframework.restdocs.templates.TemplateFormats; -import org.springframework.restdocs.test.OperationBuilder; +import org.springframework.restdocs.testfixtures.OperationBuilder; import static org.hamcrest.CoreMatchers.endsWith; import static org.hamcrest.CoreMatchers.equalTo; diff --git a/spring-restdocs-core/src/test/java/org/springframework/restdocs/payload/RequestPartFieldsSnippetFailureTests.java b/spring-restdocs-core/src/test/java/org/springframework/restdocs/payload/RequestPartFieldsSnippetFailureTests.java index 13427f25..61cde5fb 100644 --- a/spring-restdocs-core/src/test/java/org/springframework/restdocs/payload/RequestPartFieldsSnippetFailureTests.java +++ b/spring-restdocs-core/src/test/java/org/springframework/restdocs/payload/RequestPartFieldsSnippetFailureTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2019 the original author or authors. + * Copyright 2014-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ import org.junit.rules.ExpectedException; import org.springframework.restdocs.snippet.SnippetException; import org.springframework.restdocs.templates.TemplateFormats; -import org.springframework.restdocs.test.OperationBuilder; +import org.springframework.restdocs.testfixtures.OperationBuilder; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.CoreMatchers.startsWith; diff --git a/spring-restdocs-core/src/test/java/org/springframework/restdocs/payload/ResponseFieldsSnippetFailureTests.java b/spring-restdocs-core/src/test/java/org/springframework/restdocs/payload/ResponseFieldsSnippetFailureTests.java index 3b934f33..fa33bebc 100644 --- a/spring-restdocs-core/src/test/java/org/springframework/restdocs/payload/ResponseFieldsSnippetFailureTests.java +++ b/spring-restdocs-core/src/test/java/org/springframework/restdocs/payload/ResponseFieldsSnippetFailureTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2019 the original author or authors. + * Copyright 2014-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,7 +28,7 @@ import org.springframework.http.HttpHeaders; import org.springframework.http.MediaType; import org.springframework.restdocs.snippet.SnippetException; import org.springframework.restdocs.templates.TemplateFormats; -import org.springframework.restdocs.test.OperationBuilder; +import org.springframework.restdocs.testfixtures.OperationBuilder; import static org.hamcrest.CoreMatchers.endsWith; import static org.hamcrest.CoreMatchers.equalTo; diff --git a/spring-restdocs-core/src/test/java/org/springframework/restdocs/request/PathParametersSnippetFailureTests.java b/spring-restdocs-core/src/test/java/org/springframework/restdocs/request/PathParametersSnippetFailureTests.java index b7a29b10..e43207d6 100644 --- a/spring-restdocs-core/src/test/java/org/springframework/restdocs/request/PathParametersSnippetFailureTests.java +++ b/spring-restdocs-core/src/test/java/org/springframework/restdocs/request/PathParametersSnippetFailureTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2019 the original author or authors. + * Copyright 2014-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,7 +27,7 @@ import org.junit.rules.ExpectedException; import org.springframework.restdocs.generate.RestDocumentationGenerator; import org.springframework.restdocs.snippet.SnippetException; import org.springframework.restdocs.templates.TemplateFormats; -import org.springframework.restdocs.test.OperationBuilder; +import org.springframework.restdocs.testfixtures.OperationBuilder; import static org.hamcrest.CoreMatchers.equalTo; import static org.springframework.restdocs.request.RequestDocumentation.parameterWithName; diff --git a/spring-restdocs-core/src/test/java/org/springframework/restdocs/request/RequestParametersSnippetFailureTests.java b/spring-restdocs-core/src/test/java/org/springframework/restdocs/request/RequestParametersSnippetFailureTests.java index 2410ca69..493babd6 100644 --- a/spring-restdocs-core/src/test/java/org/springframework/restdocs/request/RequestParametersSnippetFailureTests.java +++ b/spring-restdocs-core/src/test/java/org/springframework/restdocs/request/RequestParametersSnippetFailureTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2019 the original author or authors. + * Copyright 2014-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ import org.junit.rules.ExpectedException; import org.springframework.restdocs.snippet.SnippetException; import org.springframework.restdocs.templates.TemplateFormats; -import org.springframework.restdocs.test.OperationBuilder; +import org.springframework.restdocs.testfixtures.OperationBuilder; import static org.hamcrest.CoreMatchers.equalTo; import static org.springframework.restdocs.request.RequestDocumentation.parameterWithName; diff --git a/spring-restdocs-core/src/test/java/org/springframework/restdocs/request/RequestPartsSnippetFailureTests.java b/spring-restdocs-core/src/test/java/org/springframework/restdocs/request/RequestPartsSnippetFailureTests.java index 11c1442a..c937499b 100644 --- a/spring-restdocs-core/src/test/java/org/springframework/restdocs/request/RequestPartsSnippetFailureTests.java +++ b/spring-restdocs-core/src/test/java/org/springframework/restdocs/request/RequestPartsSnippetFailureTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2019 the original author or authors. + * Copyright 2014-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ import org.junit.rules.ExpectedException; import org.springframework.restdocs.snippet.SnippetException; import org.springframework.restdocs.templates.TemplateFormats; -import org.springframework.restdocs.test.OperationBuilder; +import org.springframework.restdocs.testfixtures.OperationBuilder; import static org.hamcrest.CoreMatchers.equalTo; import static org.springframework.restdocs.request.RequestDocumentation.partWithName; diff --git a/spring-restdocs-core/src/test/java/org/springframework/restdocs/snippet/TemplatedSnippetTests.java b/spring-restdocs-core/src/test/java/org/springframework/restdocs/snippet/TemplatedSnippetTests.java index f44e85a7..8892891a 100644 --- a/spring-restdocs-core/src/test/java/org/springframework/restdocs/snippet/TemplatedSnippetTests.java +++ b/spring-restdocs-core/src/test/java/org/springframework/restdocs/snippet/TemplatedSnippetTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2019 the original author or authors. + * Copyright 2014-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,8 +26,8 @@ import org.junit.Test; import org.springframework.restdocs.operation.Operation; import org.springframework.restdocs.templates.TemplateFormats; -import org.springframework.restdocs.test.GeneratedSnippets; -import org.springframework.restdocs.test.OperationBuilder; +import org.springframework.restdocs.testfixtures.GeneratedSnippets; +import org.springframework.restdocs.testfixtures.OperationBuilder; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-restdocs-core/src/test/java/org/springframework/restdocs/test/GeneratedSnippets.java b/spring-restdocs-core/src/testFixtures/java/org/springframework/restdocs/testfixtures/GeneratedSnippets.java similarity index 96% rename from spring-restdocs-core/src/test/java/org/springframework/restdocs/test/GeneratedSnippets.java rename to spring-restdocs-core/src/testFixtures/java/org/springframework/restdocs/testfixtures/GeneratedSnippets.java index 6c03b4b1..8598f2b7 100644 --- a/spring-restdocs-core/src/test/java/org/springframework/restdocs/test/GeneratedSnippets.java +++ b/spring-restdocs-core/src/testFixtures/java/org/springframework/restdocs/testfixtures/GeneratedSnippets.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2019 the original author or authors. + * Copyright 2014-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.restdocs.test; +package org.springframework.restdocs.testfixtures; import java.io.File; import java.io.FileInputStream; diff --git a/spring-restdocs-core/src/test/java/org/springframework/restdocs/test/OperationBuilder.java b/spring-restdocs-core/src/testFixtures/java/org/springframework/restdocs/testfixtures/OperationBuilder.java similarity index 98% rename from spring-restdocs-core/src/test/java/org/springframework/restdocs/test/OperationBuilder.java rename to spring-restdocs-core/src/testFixtures/java/org/springframework/restdocs/testfixtures/OperationBuilder.java index fbe16a08..9308255b 100644 --- a/spring-restdocs-core/src/test/java/org/springframework/restdocs/test/OperationBuilder.java +++ b/spring-restdocs-core/src/testFixtures/java/org/springframework/restdocs/testfixtures/OperationBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2019 the original author or authors. + * Copyright 2014-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.restdocs.test; +package org.springframework.restdocs.testfixtures; import java.io.File; import java.net.URI; diff --git a/spring-restdocs-core/src/test/java/org/springframework/restdocs/test/OperationTestRule.java b/spring-restdocs-core/src/testFixtures/java/org/springframework/restdocs/testfixtures/OperationTestRule.java similarity index 93% rename from spring-restdocs-core/src/test/java/org/springframework/restdocs/test/OperationTestRule.java rename to spring-restdocs-core/src/testFixtures/java/org/springframework/restdocs/testfixtures/OperationTestRule.java index bc8d532e..79e19f0f 100644 --- a/spring-restdocs-core/src/test/java/org/springframework/restdocs/test/OperationTestRule.java +++ b/spring-restdocs-core/src/testFixtures/java/org/springframework/restdocs/testfixtures/OperationTestRule.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2019 the original author or authors. + * Copyright 2014-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.restdocs.test; +package org.springframework.restdocs.testfixtures; import java.io.File; diff --git a/spring-restdocs-core/src/test/java/org/springframework/restdocs/test/OutputCapture.java b/spring-restdocs-core/src/testFixtures/java/org/springframework/restdocs/testfixtures/OutputCapture.java similarity index 97% rename from spring-restdocs-core/src/test/java/org/springframework/restdocs/test/OutputCapture.java rename to spring-restdocs-core/src/testFixtures/java/org/springframework/restdocs/testfixtures/OutputCapture.java index 95100835..d8c86ed6 100644 --- a/spring-restdocs-core/src/test/java/org/springframework/restdocs/test/OutputCapture.java +++ b/spring-restdocs-core/src/testFixtures/java/org/springframework/restdocs/testfixtures/OutputCapture.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.restdocs.test; +package org.springframework.restdocs.testfixtures; import java.io.ByteArrayOutputStream; import java.io.IOException; diff --git a/spring-restdocs-core/src/test/java/org/springframework/restdocs/test/SnippetConditions.java b/spring-restdocs-core/src/testFixtures/java/org/springframework/restdocs/testfixtures/SnippetConditions.java similarity index 96% rename from spring-restdocs-core/src/test/java/org/springframework/restdocs/test/SnippetConditions.java rename to spring-restdocs-core/src/testFixtures/java/org/springframework/restdocs/testfixtures/SnippetConditions.java index de574f19..9bd3db02 100644 --- a/spring-restdocs-core/src/test/java/org/springframework/restdocs/test/SnippetConditions.java +++ b/spring-restdocs-core/src/testFixtures/java/org/springframework/restdocs/testfixtures/SnippetConditions.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2019 the original author or authors. + * Copyright 2014-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.restdocs.test; +package org.springframework.restdocs.testfixtures; import java.io.StringWriter; import java.util.ArrayList; @@ -149,7 +149,7 @@ public final class SnippetConditions { /** * Base class for code block Conditions. * - * @param The type of the Condition + * @param the type of the Condition */ public static class CodeBlockCondition> extends AbstractSnippetContentCondition { @@ -164,7 +164,7 @@ public final class SnippetConditions { /** * A {@link Condition} for an Asciidoctor code block. * - * @param The type of the Condition + * @param the type of the Condition */ public static class AsciidoctorCodeBlockCondition> extends CodeBlockCondition { @@ -181,7 +181,7 @@ public final class SnippetConditions { /** * A {@link Condition} for a Markdown code block. * - * @param The type of the Condition + * @param the type of the Condition */ public static class MarkdownCodeBlockCondition> extends CodeBlockCondition { @@ -196,7 +196,7 @@ public final class SnippetConditions { /** * A {@link Condition} for an HTTP request or response. * - * @param The type of the Condition + * @param the type of the Condition */ public abstract static class HttpCondition> extends Condition { @@ -271,7 +271,7 @@ public final class SnippetConditions { /** * Base class for table Conditions. * - * @param The concrete type of the Condition + * @param the concrete type of the Condition */ public abstract static class TableCondition> extends AbstractSnippetContentCondition { diff --git a/spring-restdocs-mockmvc/build.gradle b/spring-restdocs-mockmvc/build.gradle index e5d26d6f..e6c1f35d 100644 --- a/spring-restdocs-mockmvc/build.gradle +++ b/spring-restdocs-mockmvc/build.gradle @@ -16,7 +16,7 @@ dependencies { internal(platform(project(":spring-restdocs-platform"))) - testImplementation(project(path: ":spring-restdocs-core", configuration: "testArtifacts")) + testImplementation(testFixtures(project(":spring-restdocs-core"))) testImplementation("junit:junit") testImplementation("org.assertj:assertj-core") testImplementation("org.hamcrest:hamcrest-library") diff --git a/spring-restdocs-mockmvc/src/test/java/org/springframework/restdocs/mockmvc/MockMvcRestDocumentationIntegrationTests.java b/spring-restdocs-mockmvc/src/test/java/org/springframework/restdocs/mockmvc/MockMvcRestDocumentationIntegrationTests.java index fdb6d4b0..c970a0ac 100644 --- a/spring-restdocs-mockmvc/src/test/java/org/springframework/restdocs/mockmvc/MockMvcRestDocumentationIntegrationTests.java +++ b/spring-restdocs-mockmvc/src/test/java/org/springframework/restdocs/mockmvc/MockMvcRestDocumentationIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2019 the original author or authors. + * Copyright 2014-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -52,10 +52,10 @@ import org.springframework.restdocs.JUnitRestDocumentation; import org.springframework.restdocs.mockmvc.MockMvcRestDocumentationIntegrationTests.TestConfiguration; import org.springframework.restdocs.templates.TemplateFormat; import org.springframework.restdocs.templates.TemplateFormats; -import org.springframework.restdocs.test.SnippetConditions; -import org.springframework.restdocs.test.SnippetConditions.CodeBlockCondition; -import org.springframework.restdocs.test.SnippetConditions.HttpRequestCondition; -import org.springframework.restdocs.test.SnippetConditions.HttpResponseCondition; +import org.springframework.restdocs.testfixtures.SnippetConditions; +import org.springframework.restdocs.testfixtures.SnippetConditions.CodeBlockCondition; +import org.springframework.restdocs.testfixtures.SnippetConditions.HttpRequestCondition; +import org.springframework.restdocs.testfixtures.SnippetConditions.HttpResponseCondition; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.web.WebAppConfiguration; diff --git a/spring-restdocs-restassured/build.gradle b/spring-restdocs-restassured/build.gradle index 67c420ad..6b3546d1 100644 --- a/spring-restdocs-restassured/build.gradle +++ b/spring-restdocs-restassured/build.gradle @@ -14,7 +14,7 @@ dependencies { internal(platform(project(":spring-restdocs-platform"))) - testImplementation(project(path: ":spring-restdocs-core", configuration: "testArtifacts")) + testImplementation(testFixtures(project(":spring-restdocs-core"))) testImplementation("com.fasterxml.jackson.core:jackson-databind") testImplementation("junit:junit") testImplementation("org.apache.tomcat.embed:tomcat-embed-core:8.5.13") diff --git a/spring-restdocs-restassured/src/test/java/org/springframework/restdocs/restassured3/RestAssuredRestDocumentationIntegrationTests.java b/spring-restdocs-restassured/src/test/java/org/springframework/restdocs/restassured3/RestAssuredRestDocumentationIntegrationTests.java index aa86fc1f..a6c77d4c 100644 --- a/spring-restdocs-restassured/src/test/java/org/springframework/restdocs/restassured3/RestAssuredRestDocumentationIntegrationTests.java +++ b/spring-restdocs-restassured/src/test/java/org/springframework/restdocs/restassured3/RestAssuredRestDocumentationIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2019 the original author or authors. + * Copyright 2014-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,10 +38,10 @@ import org.springframework.http.MediaType; import org.springframework.restdocs.JUnitRestDocumentation; import org.springframework.restdocs.templates.TemplateFormat; import org.springframework.restdocs.templates.TemplateFormats; -import org.springframework.restdocs.test.SnippetConditions; -import org.springframework.restdocs.test.SnippetConditions.CodeBlockCondition; -import org.springframework.restdocs.test.SnippetConditions.HttpRequestCondition; -import org.springframework.restdocs.test.SnippetConditions.HttpResponseCondition; +import org.springframework.restdocs.testfixtures.SnippetConditions; +import org.springframework.restdocs.testfixtures.SnippetConditions.CodeBlockCondition; +import org.springframework.restdocs.testfixtures.SnippetConditions.HttpRequestCondition; +import org.springframework.restdocs.testfixtures.SnippetConditions.HttpResponseCondition; import org.springframework.util.FileCopyUtils; import org.springframework.web.bind.annotation.RequestMethod; diff --git a/spring-restdocs-webtestclient/build.gradle b/spring-restdocs-webtestclient/build.gradle index 5ef9d0dd..676e3792 100644 --- a/spring-restdocs-webtestclient/build.gradle +++ b/spring-restdocs-webtestclient/build.gradle @@ -13,7 +13,7 @@ dependencies { internal(platform(project(":spring-restdocs-platform"))) - testImplementation(project(path: ":spring-restdocs-core", configuration: "testArtifacts")) + testImplementation(testFixtures(project(":spring-restdocs-core"))) testImplementation("junit:junit") testImplementation("org.assertj:assertj-core") testImplementation("org.hamcrest:hamcrest-library") diff --git a/spring-restdocs-webtestclient/src/test/java/org/springframework/restdocs/webtestclient/WebTestClientRestDocumentationIntegrationTests.java b/spring-restdocs-webtestclient/src/test/java/org/springframework/restdocs/webtestclient/WebTestClientRestDocumentationIntegrationTests.java index 3c59dc60..b7a653d2 100644 --- a/spring-restdocs-webtestclient/src/test/java/org/springframework/restdocs/webtestclient/WebTestClientRestDocumentationIntegrationTests.java +++ b/spring-restdocs-webtestclient/src/test/java/org/springframework/restdocs/webtestclient/WebTestClientRestDocumentationIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2019 the original author or authors. + * Copyright 2014-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,10 +41,10 @@ import org.springframework.http.ResponseCookie; import org.springframework.restdocs.JUnitRestDocumentation; import org.springframework.restdocs.templates.TemplateFormat; import org.springframework.restdocs.templates.TemplateFormats; -import org.springframework.restdocs.test.SnippetConditions; -import org.springframework.restdocs.test.SnippetConditions.CodeBlockCondition; -import org.springframework.restdocs.test.SnippetConditions.HttpResponseCondition; -import org.springframework.restdocs.test.SnippetConditions.TableCondition; +import org.springframework.restdocs.testfixtures.SnippetConditions; +import org.springframework.restdocs.testfixtures.SnippetConditions.CodeBlockCondition; +import org.springframework.restdocs.testfixtures.SnippetConditions.HttpResponseCondition; +import org.springframework.restdocs.testfixtures.SnippetConditions.TableCondition; import org.springframework.test.web.reactive.server.EntityExchangeResult; import org.springframework.test.web.reactive.server.WebTestClient; import org.springframework.util.FileCopyUtils;