use of com.dtflys.test.http.model.JsonTestUser in project forest by dromara.
the class TestGetClient method testAnnObjectGet.
@Test
public void testAnnObjectGet() throws InterruptedException {
server.enqueue(new MockResponse().setHeader("Content-Type", "application/json").setHeader("Content-Encoding", "UTF-8").setBody(EXPECTED));
JsonTestUser user = new JsonTestUser();
user.setUsername("foo");
assertThat(getClient.annObjectGet(user)).isNotNull().isEqualTo(EXPECTED);
mockRequest(server).assertHeaderEquals("Accept", "text/plain").assertPathEquals("/hello/user").assertQueryEquals("username", "foo");
}
Aggregations