Fixes after code review.
This commit is contained in:
@@ -18,7 +18,6 @@
|
||||
<jsonassert.version>0.4.13</jsonassert.version>
|
||||
<aether.version>1.0.2.v20150114</aether.version>
|
||||
<rest-assured.version>3.0.7</rest-assured.version>
|
||||
<junit5-version>5.2.0</junit5-version>
|
||||
</properties>
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
@@ -156,16 +155,6 @@
|
||||
<artifactId>maven-settings-builder</artifactId>
|
||||
<version>3.2.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-engine</artifactId>
|
||||
<version>${junit5-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-api</artifactId>
|
||||
<version>${junit5-version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
<profiles>
|
||||
|
||||
@@ -314,7 +314,7 @@ JUnit 5 Extension example:
|
||||
|
||||
[source,java,indent=0]
|
||||
----
|
||||
include::src/test/java/org/springframework/cloud/contract/stubrunner/junit/StubRunnerJUnit5ExtensionTest.java[tags=extension]
|
||||
include::src/test/java/org/springframework/cloud/contract/stubrunner/junit/StubRunnerJUnit5ExtensionTests.java[tags=extension]
|
||||
----
|
||||
|
||||
Check the *Common properties for JUnit and Spring* for more information on how to apply global configuration of Stub Runner.
|
||||
|
||||
@@ -16,10 +16,11 @@
|
||||
|
||||
package org.springframework.cloud.contract.stubrunner.junit;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.junit.jupiter.api.extension.AfterAllCallback;
|
||||
import org.junit.jupiter.api.extension.BeforeAllCallback;
|
||||
import org.junit.jupiter.api.extension.ExtensionContext;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.cloud.contract.spec.Contract;
|
||||
import org.springframework.cloud.contract.stubrunner.BatchStubRunner;
|
||||
import org.springframework.cloud.contract.stubrunner.BatchStubRunnerFactory;
|
||||
@@ -49,8 +50,7 @@ public class StubRunnerExtension implements BeforeAllCallback, AfterAllCallback,
|
||||
|
||||
private static final String DELIMITER = ":";
|
||||
private static final String LATEST_VERSION = "+";
|
||||
|
||||
private static org.slf4j.Logger LOG = LoggerFactory.getLogger(StubRunnerExtension.class);
|
||||
private static final Log LOG = LogFactory.getLog(StubRunnerExtension.class);
|
||||
|
||||
StubRunnerExtension delegate = this;
|
||||
private BatchStubRunner stubFinder;
|
||||
|
||||
@@ -33,7 +33,7 @@ import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
* @author Olga Maciaszek-Sharma
|
||||
* @since 2.1.0
|
||||
*/
|
||||
class StubRunnerJUnit5ExtensionCustomMessageVerifierTest {
|
||||
class StubRunnerJUnit5ExtensionCustomMessageVerifierTests {
|
||||
|
||||
@BeforeAll
|
||||
@AfterAll
|
||||
@@ -33,7 +33,7 @@ import static org.assertj.core.api.BDDAssertions.then;
|
||||
* @author Olga Maciaszek-Sharma
|
||||
* @since 2.1.0
|
||||
*/
|
||||
class StubRunnerJUnit5ExtensionCustomPortTest {
|
||||
class StubRunnerJUnit5ExtensionCustomPortTests {
|
||||
|
||||
@BeforeAll
|
||||
@AfterAll
|
||||
@@ -70,7 +70,7 @@ class StubRunnerJUnit5ExtensionCustomPortTest {
|
||||
|
||||
private static String repoRoot() {
|
||||
try {
|
||||
return StubRunnerJUnit5ExtensionCustomPortTest.class.getResource("/m2repo/repository/")
|
||||
return StubRunnerJUnit5ExtensionCustomPortTests.class.getResource("/m2repo/repository/")
|
||||
.toURI().toString();
|
||||
} catch (Exception e) {
|
||||
return "";
|
||||
@@ -28,7 +28,7 @@ import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
* @author Olga Maciaszek-Sharma
|
||||
* @since 2.1.0
|
||||
*/
|
||||
public class StubRunnerJUnit5ExtensionExceptionThrowingTest {
|
||||
public class StubRunnerJUnit5ExtensionExceptionThrowingTests {
|
||||
|
||||
@RegisterExtension
|
||||
static StubRunnerExtension stubRunnerExtension = new StubRunnerExtension()
|
||||
@@ -32,7 +32,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
* @author Olga Maciaszek-Sharma
|
||||
*/
|
||||
|
||||
class StubRunnerJUnit5ExtensionTest {
|
||||
class StubRunnerJUnit5ExtensionTests {
|
||||
|
||||
@BeforeAll
|
||||
@AfterAll
|
||||
Reference in New Issue
Block a user