As discussed here:
https://groups.google.com/forum/#!topic/rest-assured/vqXqsyikhXM
It seems the traditional RequestSpecification and Spring specific
MockMvcRequestSpecification are not compatible.
They both implement interfaces but are not compatible.
What I was looking for is to have something like:
RequestSpecification requestSpec = null
if (mockMvc) {
requestSpec = RestAssuredMockMvc.given();
} else {
requestSpec = RestAssured.with();
}
requestSpec.given()..when()..then()..;
Would something like this be possible.
This way I would be able to re-use tesst and perform them 1) as
junit/integration tests using MockMvc and 2) as acceptance testing against an
actual running server.
Original issue reported on code.google.com by marceloverdijk on 5 Nov 2014 at 8:18
Original issue reported on code.google.com by
marceloverdijk
on 5 Nov 2014 at 8:18