Mock - gorskip/testing-framework GitHub Wiki
RestMock
Example file:
[
{
"name": "myFirstMock",
"expected": {
"status": 200,
"headers": null,
"body": {
"id": 1,
"name": "Mock response",
"type": ["mock"]
}
},
"response": {
"status": 200,
"headers": null,
"body": {
"id": 1,
"name": "Mock response",
"type": ["test", "mock"]
}
}
}
]
Usage:
RestMock restMock = new Mock("fileNameFromResource")
.restMock("myFirstMock");
Response response = restMock.getResponse();
Expected expected = restMock.getExpected();