diff --git a/accurest-core/src/main/groovy/io/codearte/accurest/dsl/internal/Request.groovy b/accurest-core/src/main/groovy/io/codearte/accurest/dsl/internal/Request.groovy index 67b9dde09f..1ed604d4fb 100644 --- a/accurest-core/src/main/groovy/io/codearte/accurest/dsl/internal/Request.groovy +++ b/accurest-core/src/main/groovy/io/codearte/accurest/dsl/internal/Request.groovy @@ -125,26 +125,6 @@ class Request extends Common { return new MatchingStrategy(value, MatchingStrategy.Type.EQUAL_TO_JSON) } - MatchingStrategy equalToJson(Object value, JSONCompareMode jsonCompareMode) { - return new MatchingStrategy(value, MatchingStrategy.Type.EQUAL_TO_JSON) - } - - MatchingStrategy equalToJsonStrictly(Object value) { - return new MatchingStrategy(value, MatchingStrategy.Type.EQUAL_TO_JSON, JSONCompareMode.STRICT) - } - - MatchingStrategy equalToJsonLeniently(Object value) { - return new MatchingStrategy(value, MatchingStrategy.Type.EQUAL_TO_JSON, JSONCompareMode.LENIENT) - } - - MatchingStrategy equalToJsonNonExtensibly(Object value) { - return new MatchingStrategy(value, MatchingStrategy.Type.EQUAL_TO_JSON, JSONCompareMode.NON_EXTENSIBLE) - } - - MatchingStrategy equalToJsonWithStrictOrder(Object value) { - return new MatchingStrategy(value, MatchingStrategy.Type.EQUAL_TO_JSON, JSONCompareMode.STRICT_ORDER) - } - } @CompileStatic diff --git a/accurest-core/src/test/groovy/io/codearte/accurest/dsl/WiremockGroovyDslSpec.groovy b/accurest-core/src/test/groovy/io/codearte/accurest/dsl/WiremockGroovyDslSpec.groovy index 5f6cb74fab..c066f4a9cc 100755 --- a/accurest-core/src/test/groovy/io/codearte/accurest/dsl/WiremockGroovyDslSpec.groovy +++ b/accurest-core/src/test/groovy/io/codearte/accurest/dsl/WiremockGroovyDslSpec.groovy @@ -400,42 +400,6 @@ class WiremockGroovyDslSpec extends WiremockSpec { stubMappingIsValidWiremockStub(json) } - def 'should use equalToJson compare mode'() { - given: - GroovyDsl groovyDsl = GroovyDsl.make { - request { - method 'GET' - url "/users" - body equalToJsonWithStrictOrder('''{"name":"Jan"}''') - } - response { - status 200 - } - } - when: - String json = toWiremockClientJsonStub(groovyDsl) - then: - parseJson(json) == parseJson(''' - { - "request": { - "method": "GET", - "url": "/users", - "bodyPatterns": [ - { - "equalToJson":"{\\"name\\":\\"Jan\\"}", - "jsonCompareMode":"STRICT_ORDER" - } - ] - }, - "response": { - "status": 200 - } - } - ''') - and: - stubMappingIsValidWiremockStub(json) - } - def 'should use equalToJson'() { given: GroovyDsl groovyDsl = GroovyDsl.make {