Introduced File for verifying if a stubgenerator should be used

This commit is contained in:
Marcin Grzejszczak
2020-11-10 14:50:26 +01:00
parent 8871838e69
commit 0cbf8e9ca7
9 changed files with 69 additions and 17 deletions

View File

@@ -45,7 +45,7 @@ final class MappingGenerator {
File mappingsFolder) {
StubGeneratorProvider provider = new StubGeneratorProvider();
Collection<StubGenerator> stubGenerators = provider
.converterForName(contractFile.getName());
.converterForName(contractFile);
if (log.isDebugEnabled()) {
log.debug("Found following matching stub generators " + stubGenerators);
}

View File

@@ -51,8 +51,8 @@ import org.springframework.cloud.contract.verifier.messaging.MessageVerifier;
* @author Olga Maciaszek-Sharma
* @since 2.1.0
*/
public class StubRunnerExtension implements BeforeAllCallback, AfterAllCallback, BeforeEachCallback, AfterEachCallback,
StubFinder, StubRunnerExtensionOptions {
public class StubRunnerExtension implements BeforeAllCallback, AfterAllCallback,
BeforeEachCallback, AfterEachCallback, StubFinder, StubRunnerExtensionOptions {
private static final String DELIMITER = ":";
@@ -84,7 +84,8 @@ public class StubRunnerExtension implements BeforeAllCallback, AfterAllCallback,
public void afterAll(ExtensionContext extensionContext) {
try {
after();
} finally {
}
finally {
this.afterAllCalled.set(true);
}
}
@@ -105,7 +106,8 @@ public class StubRunnerExtension implements BeforeAllCallback, AfterAllCallback,
public void beforeAll(ExtensionContext extensionContext) {
try {
before();
} finally {
}
finally {
this.beforeAllCalled.set(true);
}
}
@@ -133,7 +135,6 @@ public class StubRunnerExtension implements BeforeAllCallback, AfterAllCallback,
}
}
@Override
public URL findStubUrl(String groupId, String artifactId)
throws StubNotFoundException {

View File

@@ -99,8 +99,8 @@ public class StubRunnerCamelConfiguration {
@Override
public void process(Exchange exchange) {
if (log.isDebugEnabled()) {
log.debug("Got exchange [" + exchange + "]");
if (log.isTraceEnabled()) {
log.trace("Got exchange [" + exchange + "]");
}
}