当前位置: 首页>>代码示例>>Java>>正文


Java HTTP.GET属性代码示例

本文整理汇总了Java中org.neo4j.test.server.HTTP.GET属性的典型用法代码示例。如果您正苦于以下问题:Java HTTP.GET属性的具体用法?Java HTTP.GET怎么用?Java HTTP.GET使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.neo4j.test.server.HTTP的用法示例。


在下文中一共展示了HTTP.GET属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: shouldCreateTag

@Test
public void shouldCreateTag() throws InterruptedException {
    HTTP.POST(neo4j.httpURI().resolve("/v1/schema/create").toString());

    HTTP.Response response = HTTP.POST(neo4j.httpURI().resolve("/v1/users/maxdemarzi/posts").toString(), input);
    HashMap actual  = response.content();
    Assert.assertEquals(expected.get(STATUS), actual.get(STATUS));
    Assert.assertTrue(actual.containsKey(TIME));
    sleep(1000); // Needed due to artifact in testing
    response = HTTP.GET(neo4j.httpURI().resolve("/v1/tags/neo4j").toString());
    ArrayList<HashMap> actual2  = response.content();
    expected2.get(0).put(TIME, actual2.get(0).get(TIME));
    Assert.assertEquals(expected2, actual2);

    Assert.assertEquals("maxdemarzi", actual2.get(0).get(USERNAME));
    Assert.assertEquals("Max De Marzi", actual2.get(0).get(NAME));
    Assert.assertEquals(expected.get(STATUS), actual2.get(0).get(STATUS));
}
 
开发者ID:maxdemarzi,项目名称:grittier_ext,代码行数:18,代码来源:CreateTagTest.java

示例2: shouldCreateMention

@Test
public void shouldCreateMention() throws InterruptedException {
    HTTP.POST(neo4j.httpURI().resolve("/v1/schema/create").toString());

    HTTP.Response response = HTTP.POST(neo4j.httpURI().resolve("/v1/users/maxdemarzi/posts").toString(), input);
    HashMap actual  = response.content();
    Assert.assertEquals(expected.get(STATUS), actual.get(STATUS));
    Assert.assertTrue(actual.containsKey(TIME));
    sleep(1000); // Needed due to artifact in testing
    response = HTTP.GET(neo4j.httpURI().resolve("/v1/users/jexp/mentions").toString());
    ArrayList<HashMap> actual2  = response.content();
    expected2.get(0).put(TIME, actual2.get(0).get(TIME));
    Assert.assertEquals(expected2, actual2);

    Assert.assertEquals("maxdemarzi", actual2.get(0).get(USERNAME));
    Assert.assertEquals("Max De Marzi", actual2.get(0).get(NAME));
    Assert.assertEquals("Hello @jexp", actual2.get(0).get(STATUS));
}
 
开发者ID:maxdemarzi,项目名称:grittier_ext,代码行数:18,代码来源:CreateMentionsTest.java

示例3: shouldGetLatest

@Test
public void shouldGetLatest() throws InterruptedException {
    HTTP.POST(neo4j.httpURI().resolve("/v1/schema/create").toString());
    sleep(1000);
    HTTP.Response response = HTTP.GET(neo4j.httpURI().resolve("/v1/search/latest").toString());
    ArrayList<HashMap> actual  = response.content();
    Assert.assertEquals(expected, actual);
}
 
开发者ID:maxdemarzi,项目名称:grittier_ext,代码行数:8,代码来源:GetLatestTest.java

示例4: shouldGetLikesWithUser

@Test
public void shouldGetLikesWithUser() {
    HTTP.POST(neo4j.httpURI().resolve("/v1/schema/create").toString());

    HTTP.Response response = HTTP.GET(neo4j.httpURI().resolve("/v1/users/jexp/likes?username2=maxdemarzi").toString());
    ArrayList<HashMap> actual  = response.content();
    Assert.assertEquals(expected2, actual);
}
 
开发者ID:maxdemarzi,项目名称:grittier_ext,代码行数:8,代码来源:GetLikesTest.java

示例5: shouldGetLatestLimited

@Test
public void shouldGetLatestLimited() throws InterruptedException {
    HTTP.POST(neo4j.httpURI().resolve("/v1/schema/create").toString());
    sleep(1000);
    HTTP.Response response = HTTP.GET(neo4j.httpURI().resolve("/v1/search/latest?limit=1").toString());
    ArrayList<HashMap> actual  = response.content();
    Assert.assertTrue(actual.size() == 1);
    Assert.assertEquals(expected.get(0), actual.get(0));
}
 
开发者ID:maxdemarzi,项目名称:grittier_ext,代码行数:9,代码来源:GetLatestTest.java

示例6: shouldGetFollowingSince

@Test
public void shouldGetFollowingSince() {
    HTTP.POST(neo4j.httpURI().resolve("/v1/schema/create").toString());

    HTTP.Response response = HTTP.GET(neo4j.httpURI().resolve("/v1/users/maxdemarzi/following?since=1490140300").toString());
    ArrayList<HashMap> actual  = response.content();
    Assert.assertTrue(actual.size() == 1);
    Assert.assertEquals(expected.get(1), actual.get(0));
}
 
开发者ID:maxdemarzi,项目名称:grittier_ext,代码行数:9,代码来源:GetFollowingTest.java

示例7: shouldGetSearch

@Test
public void shouldGetSearch() throws InterruptedException {
    HTTP.POST(neo4j.httpURI().resolve("/v1/schema/create").toString());
    sleep(1000);
    HTTP.Response response = HTTP.GET(neo4j.httpURI().resolve("/v1/search?q=Hello").toString());
    ArrayList<HashMap> actual  = response.content();
    Assert.assertEquals(expected, actual);
}
 
开发者ID:maxdemarzi,项目名称:grittier_ext,代码行数:8,代码来源:GetSearchTest.java

示例8: shouldGetMentionsLimited

@Test
public void shouldGetMentionsLimited() {
    HTTP.POST(neo4j.httpURI().resolve("/v1/schema/create").toString());

    HTTP.Response response = HTTP.GET(neo4j.httpURI().resolve("/v1/users/jexp/mentions?limit=1").toString());
    ArrayList<HashMap> actual  = response.content();
    Assert.assertTrue(actual.size() == 1);
    Assert.assertEquals(expected.get(0), actual.get(0));
}
 
开发者ID:maxdemarzi,项目名称:grittier_ext,代码行数:9,代码来源:GetMentionsTest.java

示例9: shouldGetFollowers

@Test
public void shouldGetFollowers() {
    HTTP.POST(neo4j.httpURI().resolve("/v1/schema/create").toString());

    HTTP.Response response = HTTP.GET(neo4j.httpURI().resolve("/v1/users/maxdemarzi/followers").toString());
    ArrayList<HashMap> actual  = response.content();
    Assert.assertEquals(expected, actual);
}
 
开发者ID:maxdemarzi,项目名称:grittier_ext,代码行数:8,代码来源:GetFollowersTest.java

示例10: shouldNotGetTagNotFound

@Test
public void shouldNotGetTagNotFound() {
    HTTP.POST(neo4j.httpURI().resolve("/v1/schema/create").toString());

    HTTP.Response response = HTTP.GET(neo4j.httpURI().resolve("/v1/tags/notneo4j").toString());
    HashMap actual  = response.content();
    Assert.assertEquals(400, response.status());
    Assert.assertEquals("Tag Not Found.", actual.get("error"));
    Assert.assertFalse(actual.containsKey(USERNAME));
    Assert.assertFalse(actual.containsKey(EMAIL));
    Assert.assertFalse(actual.containsKey(NAME));
    Assert.assertFalse(actual.containsKey(STATUS));
}
 
开发者ID:maxdemarzi,项目名称:grittier_ext,代码行数:13,代码来源:GetTagTest.java

示例11: shouldRecommendFriends

@Test
public void shouldRecommendFriends() {
    HTTP.POST(neo4j.httpURI().resolve("/v1/schema/create").toString());

    HTTP.Response response = HTTP.GET(neo4j.httpURI().resolve("/v1/users/maxdemarzi/recommendations/friends").toString());
    ArrayList<HashMap> actual  = response.content();
    Assert.assertEquals(expected, actual);
}
 
开发者ID:maxdemarzi,项目名称:grittier_ext,代码行数:8,代码来源:RecommendFriendsTest.java

示例12: shouldGetTimeline

@Test
public void shouldGetTimeline() {
    HTTP.POST(neo4j.httpURI().resolve("/v1/schema/create").toString());

    HTTP.Response response = HTTP.GET(neo4j.httpURI().resolve("/v1/users/maxdemarzi/timeline").toString());
    ArrayList<HashMap> actual  = response.content();
    Assert.assertEquals(expected, actual);
}
 
开发者ID:maxdemarzi,项目名称:grittier_ext,代码行数:8,代码来源:GetTimelineTest.java

示例13: shouldGetFollowersLimited

@Test
public void shouldGetFollowersLimited() {
    HTTP.POST(neo4j.httpURI().resolve("/v1/schema/create").toString());

    HTTP.Response response = HTTP.GET(neo4j.httpURI().resolve("/v1/users/maxdemarzi/followers?limit=1").toString());
    ArrayList<HashMap> actual  = response.content();
    Assert.assertTrue(actual.size() == 1);
    Assert.assertEquals(expected.get(0), actual.get(0));
}
 
开发者ID:maxdemarzi,项目名称:grittier_ext,代码行数:9,代码来源:GetFollowersTest.java

示例14: shouldGetPostsWithUser

@Test
public void shouldGetPostsWithUser() {
    HTTP.POST(neo4j.httpURI().resolve("/v1/schema/create").toString());

    HTTP.Response response = HTTP.GET(neo4j.httpURI().resolve("/v1/users/maxdemarzi/posts?username2=jexp").toString());
    ArrayList<HashMap> actual  = response.content();
    Assert.assertEquals(expected2, actual);
}
 
开发者ID:maxdemarzi,项目名称:grittier_ext,代码行数:8,代码来源:GetPostsTest.java

示例15: shouldGetPostsLimited

@Test
public void shouldGetPostsLimited() {
    HTTP.POST(neo4j.httpURI().resolve("/v1/schema/create").toString());

    HTTP.Response response = HTTP.GET(neo4j.httpURI().resolve("/v1/users/maxdemarzi/posts?limit=1").toString());
    ArrayList<HashMap> actual  = response.content();
    Assert.assertTrue(actual.size() == 1);
    Assert.assertEquals(expected.get(0), actual.get(0));
}
 
开发者ID:maxdemarzi,项目名称:grittier_ext,代码行数:9,代码来源:GetPostsTest.java


注:本文中的org.neo4j.test.server.HTTP.GET属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。