ManagedPooledDataSourceTest.java 文件源码

java
阅读 40 收藏 0 点赞 0 评论 0

项目:dropwizard-hikaricp 作者:
@Test
public void testInsertAndQuery() throws Exception {
    final TestEntity entity = TestEntity.builder()
            .key("abc").build();

    final Response response = this.client
            .target(String.format("http://localhost:%d/test", this.RULE.getLocalPort()))
            .request()
            .post(javax.ws.rs.client.Entity.json(entity));
    assertThat(response.getStatus()).isEqualTo(Status.CREATED.getStatusCode());

    final TestEntity createdEntity = this.client
            .target(String.format("http://localhost:%d/test/1", this.RULE.getLocalPort()))
            .request()
            .get(TestEntity.class);
    assertThat(createdEntity).isEqualToIgnoringGivenFields(entity, "id");
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号