Added more logging
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
package io.coderate.accurest.builder
|
||||
|
||||
import groovy.util.logging.Slf4j
|
||||
import io.coderate.accurest.config.TestFramework
|
||||
import io.coderate.accurest.dsl.GroovyDsl
|
||||
import io.coderate.accurest.dsl.WiremockStubStrategy
|
||||
import io.coderate.accurest.util.NamesUtil
|
||||
import io.coderate.accurest.util.StubMappingConverter
|
||||
|
||||
/**
|
||||
* @author Jakub Kubrynski
|
||||
*/
|
||||
@Slf4j
|
||||
class MethodBuilder {
|
||||
|
||||
private final String methodName
|
||||
@@ -23,6 +23,7 @@ class MethodBuilder {
|
||||
|
||||
static MethodBuilder createTestMethod(File stubsFile, TestFramework lang) {
|
||||
GroovyDsl stubContent = new GroovyShell(this.classLoader).evaluate(stubsFile)
|
||||
log.debug("Stub content Groovy DSL [$stubContent]")
|
||||
String methodName = NamesUtil.camelCase(NamesUtil.toLastDot(NamesUtil.afterLast(stubsFile.path, File.separator)))
|
||||
return new MethodBuilder(methodName, stubContent, lang)
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import io.coderate.accurest.dsl.internal.Response
|
||||
|
||||
@TypeChecked
|
||||
@EqualsAndHashCode(includeFields = true)
|
||||
@ToString(includeFields = true, includePackage = false)
|
||||
@ToString(includeFields = true, includePackage = false, includeNames = true)
|
||||
class GroovyDsl {
|
||||
|
||||
Request request
|
||||
|
||||
@@ -5,7 +5,7 @@ import groovy.transform.EqualsAndHashCode
|
||||
import groovy.transform.ToString
|
||||
import org.codehaus.groovy.runtime.GStringImpl
|
||||
|
||||
@ToString(includePackage = false, includeFields = true)
|
||||
@ToString(includePackage = false, includeFields = true, includeNames = true)
|
||||
@EqualsAndHashCode(includeFields = true)
|
||||
class Body extends DslProperty {
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import groovy.transform.ToString
|
||||
|
||||
@CompileStatic
|
||||
@EqualsAndHashCode(includeFields = true)
|
||||
@ToString(includePackage = false)
|
||||
@ToString(includePackage = false, includeNames = true)
|
||||
class DslProperty<T> {
|
||||
|
||||
final T clientValue
|
||||
|
||||
@@ -4,7 +4,7 @@ import groovy.transform.EqualsAndHashCode
|
||||
import groovy.transform.ToString
|
||||
|
||||
@EqualsAndHashCode(includeFields = true)
|
||||
@ToString(includePackage = false, includeFields = true, ignoreNulls = true)
|
||||
@ToString(includePackage = false, includeFields = true, ignoreNulls = true, includeNames = true)
|
||||
class Headers {
|
||||
|
||||
private Map<String, WithValuePattern> assertionHeaders = [:]
|
||||
|
||||
Reference in New Issue
Block a user