Bumped jsonassert to 0.4.11
fixes gh-538, gh-537
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
<description>Spring Cloud Contract Dependencies</description>
|
||||
<properties>
|
||||
<wiremock.version>2.14.0</wiremock.version>
|
||||
<jsonassert.version>0.4.10</jsonassert.version>
|
||||
<jsonassert.version>0.4.11</jsonassert.version>
|
||||
<aether.version>1.0.2.v20150114</aether.version>
|
||||
</properties>
|
||||
<dependencyManagement>
|
||||
|
||||
@@ -14,6 +14,6 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
wiremockVersion=2.14.0
|
||||
jsonAssertVersion=0.4.10
|
||||
jsonAssertVersion=0.4.11
|
||||
verifierVersion=1.2.3.BUILD-SNAPSHOT
|
||||
|
||||
|
||||
@@ -14,5 +14,5 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
wiremockVersion=2.14.0
|
||||
jsonAssertVersion=0.4.10
|
||||
jsonAssertVersion=0.4.11
|
||||
verifierVersion=1.2.3.BUILD-SNAPSHOT
|
||||
|
||||
@@ -14,5 +14,5 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
wiremockVersion=2.14.0
|
||||
jsonAssertVersion=0.4.10
|
||||
jsonAssertVersion=0.4.11
|
||||
verifierVersion=1.2.3.BUILD-SNAPSHOT
|
||||
@@ -14,6 +14,6 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
wiremockVersion=2.14.0
|
||||
jsonAssertVersion=0.4.10
|
||||
jsonAssertVersion=0.4.11
|
||||
verifierVersion=1.2.3.BUILD-SNAPSHOT
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
<dependency>
|
||||
<groupId>com.toomuchcoding.jsonassert</groupId>
|
||||
<artifactId>jsonassert</artifactId>
|
||||
<version>0.4.10</version>
|
||||
<version>0.4.11</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
<dependency>
|
||||
<groupId>com.toomuchcoding.jsonassert</groupId>
|
||||
<artifactId>jsonassert</artifactId>
|
||||
<version>0.4.10</version>
|
||||
<version>0.4.11</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
||||
@@ -201,6 +201,14 @@ class DelegatingJsonVerifiable implements MethodBufferingJsonVerifiable {
|
||||
return readyToCheck;
|
||||
}
|
||||
|
||||
@Override public JsonVerifiable isInstanceOf(Class clazz)
|
||||
throws IllegalStateException {
|
||||
DelegatingJsonVerifiable readyToCheck = new FinishedDelegatingJsonVerifiable(
|
||||
this.delegate.jsonPath(), this.delegate.isInstanceOf(clazz), this.methodsBuffer);
|
||||
readyToCheck.methodsBuffer.offer(".isInstanceOf(" + clazz.getName() + ")");
|
||||
return readyToCheck;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MethodBufferingJsonVerifiable matches(String value) {
|
||||
DelegatingJsonVerifiable readyToCheck = new FinishedDelegatingJsonVerifiable(
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
package org.springframework.cloud.contract.verifier.builder;
|
||||
|
||||
import com.jayway.jsonpath.DocumentContext;
|
||||
import com.jayway.jsonpath.JsonPath;
|
||||
import org.junit.Test;
|
||||
|
||||
import static com.toomuchcoding.jsonassert.JsonAssertion.assertThatJson;
|
||||
|
||||
/**
|
||||
* @author Marcin Grzejszczak
|
||||
*/
|
||||
public class JsonAssertTests {
|
||||
// #537
|
||||
@Test
|
||||
public void should_compare_big_decimals() {
|
||||
DocumentContext context = JsonPath.parse("{\"foo\": 55534673.56}");
|
||||
assertThatJson(context).field("['foo']").isEqualTo(55534673.57);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user