use of com.tvd12.ezyhttp.core.response.ResponseEntity in project ezyhttp by youngmonkeys.
the class ResponseEntityTest method createByOk.
@Test
public void createByOk() {
// given
// when
ResponseEntity sut = ResponseEntity.ok();
// then
Asserts.assertEquals(StatusCodes.OK, sut.getStatus());
}
use of com.tvd12.ezyhttp.core.response.ResponseEntity in project ezyhttp by youngmonkeys.
the class ResponseEntityTest method createByStatusHeadersAndBody2.
@Test
public void createByStatusHeadersAndBody2() {
// given
int status = StatusCodes.ACCEPTED;
Object body = "Hello World";
// when
ResponseEntity sut = ResponseEntity.create(status, body);
// then
Asserts.assertEquals(status, sut.getStatus());
Asserts.assertEquals(body, sut.getBody());
}
use of com.tvd12.ezyhttp.core.response.ResponseEntity in project ezyhttp by youngmonkeys.
the class ResponseEntityTest method createByNotFound.
@Test
public void createByNotFound() {
// given
// when
ResponseEntity sut = ResponseEntity.notFound();
// then
Asserts.assertEquals(StatusCodes.NOT_FOUND, sut.getStatus());
}
use of com.tvd12.ezyhttp.core.response.ResponseEntity in project ezyhttp by youngmonkeys.
the class ResponseEntityTest method createByStatus.
@Test
public void createByStatus() {
// given
int status = StatusCodes.ACCEPTED;
// when
ResponseEntity sut = ResponseEntity.status(status).build();
// then
Asserts.assertEquals(status, sut.getStatus());
}
use of com.tvd12.ezyhttp.core.response.ResponseEntity in project ezyhttp by youngmonkeys.
the class ResponseEntityTest method noContentTest.
@Test
public void noContentTest() {
// given
// when
ResponseEntity sut = ResponseEntity.noContent();
// then
Asserts.assertEquals(StatusCodes.NO_CONTENT, sut.getStatus());
}
Aggregations