Fixed JaxrsClient method builder spec naming.
This commit is contained in:
@@ -42,7 +42,29 @@ class SingleTestGeneratorSpec extends Specification {
|
||||
}
|
||||
|
||||
@Unroll
|
||||
def "should build test class for #testFramework"() {
|
||||
def "should build MockMvc test class for #testFramework"() {
|
||||
given:
|
||||
AccurestConfigProperties properties = new AccurestConfigProperties();
|
||||
properties.targetFramework = testFramework
|
||||
Contract contract = new Contract(file.toPath(), true, 1, 2)
|
||||
contract.ignored >> true
|
||||
contract.order >> 2
|
||||
SingleTestGenerator testGenerator = new SingleTestGenerator(properties)
|
||||
|
||||
when:
|
||||
String clazz = testGenerator.buildClass([contract], "test", "test")
|
||||
|
||||
then:
|
||||
classStrings.forEach({ clazz.contains(it) })
|
||||
|
||||
where:
|
||||
testFramework | classStrings
|
||||
JUNIT | jUnitClassStrings
|
||||
SPOCK | spockClassStrings
|
||||
}
|
||||
|
||||
@Unroll
|
||||
def "should build JaxRs test class for #testFramework"() {
|
||||
given:
|
||||
AccurestConfigProperties properties = new AccurestConfigProperties();
|
||||
properties.targetFramework = testFramework
|
||||
|
||||
@@ -8,7 +8,7 @@ import spock.lang.Issue
|
||||
import spock.lang.Specification
|
||||
import spock.lang.Unroll
|
||||
|
||||
class JaxRsClientSpockMethodBuilderSpec extends Specification implements WireMockStubVerifier {
|
||||
class JaxRsClientMethodBuilderSpec extends Specification implements WireMockStubVerifier {
|
||||
|
||||
@Unroll
|
||||
def "should generate assertions for simple response body with #methodBuilderName"() {
|
||||
@@ -535,9 +535,9 @@ class JaxRsClientSpockMethodBuilderSpec extends Specification implements WireMoc
|
||||
BlockBuilder blockBuilder = new BlockBuilder(" ")
|
||||
when:
|
||||
builder.appendTo(blockBuilder)
|
||||
def spockTest = blockBuilder.toString()
|
||||
def test = blockBuilder.toString()
|
||||
then:
|
||||
spockTest.contains(bodyString)
|
||||
test.contains(bodyString)
|
||||
and:
|
||||
stubMappingIsValidWireMockStub(contractDsl)
|
||||
where:
|
||||
@@ -598,9 +598,9 @@ class JaxRsClientSpockMethodBuilderSpec extends Specification implements WireMoc
|
||||
BlockBuilder blockBuilder = new BlockBuilder(" ")
|
||||
when:
|
||||
builder.appendTo(blockBuilder)
|
||||
def spockTest = blockBuilder.toString()
|
||||
def test = blockBuilder.toString()
|
||||
then:
|
||||
spockTest.contains(methodString)
|
||||
test.contains(methodString)
|
||||
and:
|
||||
stubMappingIsValidWireMockStub(contractDsl)
|
||||
where:
|
||||
Reference in New Issue
Block a user