I have been trying to use the matchesJsonSchemaInClasspath method for verifying my API against a predefined JSON, but even if I JSON format, the test case keeps on getting passed, not sure what am I doing wrong here. Or is it the limitation for this.
This is my piece of code.
@Test
public void test(){
given().get("http://jsonplaceholder.typicode.com/posts/1").then()
.assertThat().body(matchesJsonSchemaInClasspath("postpaidAccCard.json"))
.log().all();
}
and the static data I have in "postpaidAccCard.json" is :-
{ "time": "03:53:25 AM", "milliseconds_since_epoch": 1362196405309, "date": "03-02-2013" }
Still the test is passed, will be great if someone can help me out with this.