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


Java HTTP.request方法代码示例

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


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

示例1: shouldNotRemoveBlockUserNotFound

import org.neo4j.test.server.HTTP; //导入方法依赖的package包/类
@Test
public void shouldNotRemoveBlockUserNotFound() {
    HTTP.POST(neo4j.httpURI().resolve("/v1/schema/create").toString());

    HTTP.Response response = HTTP.request("DELETE", neo4j.httpURI().resolve("/v1/users/max/blocks/jexp").toString(), null);
    HashMap actual  = response.content();
    Assert.assertEquals(400, response.status());
    Assert.assertEquals("User not Found.", actual.get("error"));
}
 
开发者ID:maxdemarzi,项目名称:grittier_ext,代码行数:10,代码来源:RemoveBlocksTest.java

示例2: shouldNotRemoveBlockUser2NotFound

import org.neo4j.test.server.HTTP; //导入方法依赖的package包/类
@Test
public void shouldNotRemoveBlockUser2NotFound() {
    HTTP.POST(neo4j.httpURI().resolve("/v1/schema/create").toString());

    HTTP.Response response = HTTP.request("DELETE", neo4j.httpURI().resolve("/v1/users/maxdemarzi/blocks/pxej").toString(), null);
    HashMap actual  = response.content();
    Assert.assertEquals(400, response.status());
    Assert.assertEquals("User not Found.", actual.get("error"));
}
 
开发者ID:maxdemarzi,项目名称:grittier_ext,代码行数:10,代码来源:RemoveBlocksTest.java

示例3: shouldNotRemoveLikeBlockNotFound

import org.neo4j.test.server.HTTP; //导入方法依赖的package包/类
@Test
public void shouldNotRemoveLikeBlockNotFound() {
    HTTP.POST(neo4j.httpURI().resolve("/v1/schema/create").toString());

    HTTP.Response response = HTTP.request("DELETE", neo4j.httpURI().resolve("/v1/users/maxdemarzi/blocks/laexample").toString(), null);
    HashMap actual  = response.content();
    Assert.assertEquals(400, response.status());
    Assert.assertEquals("Not blocking User.", actual.get("error"));
}
 
开发者ID:maxdemarzi,项目名称:grittier_ext,代码行数:10,代码来源:RemoveBlocksTest.java

示例4: shouldUpdatePost

import org.neo4j.test.server.HTTP; //导入方法依赖的package包/类
@Test
public void shouldUpdatePost() {
    HTTP.POST(neo4j.httpURI().resolve("/v1/schema/create").toString());

    HTTP.Response response = HTTP.request("PUT", neo4j.httpURI().resolve("/v1/users/maxdemarzi/posts/1490140299").toString(), input);
    HashMap actual  = response.content();
    Assert.assertEquals(expected, actual);
}
 
开发者ID:maxdemarzi,项目名称:grittier_ext,代码行数:9,代码来源:UpdatePostTest.java

示例5: shouldNotRemoveLikeUserNotFound

import org.neo4j.test.server.HTTP; //导入方法依赖的package包/类
@Test
public void shouldNotRemoveLikeUserNotFound() {
    HTTP.POST(neo4j.httpURI().resolve("/v1/schema/create").toString());

    HTTP.Response response = HTTP.request("DELETE", neo4j.httpURI().resolve("/v1/users/max/likes/jexp/1490140299").toString(), null);
    HashMap actual  = response.content();
    Assert.assertEquals(400, response.status());
    Assert.assertEquals("User not Found.", actual.get("error"));
}
 
开发者ID:maxdemarzi,项目名称:grittier_ext,代码行数:10,代码来源:RemoveLikeTest.java

示例6: shouldNotRemoveLikeAuthorNotFound

import org.neo4j.test.server.HTTP; //导入方法依赖的package包/类
@Test
public void shouldNotRemoveLikeAuthorNotFound() {
    HTTP.POST(neo4j.httpURI().resolve("/v1/schema/create").toString());

    HTTP.Response response = HTTP.request("DELETE", neo4j.httpURI().resolve("/v1/users/maxdemarzi/likes/pxej/1490140299").toString(), null);
    HashMap actual  = response.content();
    Assert.assertEquals(400, response.status());
    Assert.assertEquals("User not Found.", actual.get("error"));
}
 
开发者ID:maxdemarzi,项目名称:grittier_ext,代码行数:10,代码来源:RemoveLikeTest.java

示例7: shouldNotRemoveLikePostNotFound

import org.neo4j.test.server.HTTP; //导入方法依赖的package包/类
@Test
public void shouldNotRemoveLikePostNotFound() {
    HTTP.POST(neo4j.httpURI().resolve("/v1/schema/create").toString());

    HTTP.Response response = HTTP.request("DELETE", neo4j.httpURI().resolve("/v1/users/maxdemarzi/likes/jexp/1490140300").toString(), null);
    HashMap actual  = response.content();
    Assert.assertEquals(400, response.status());
    Assert.assertEquals("Post not Found.", actual.get("error"));
}
 
开发者ID:maxdemarzi,项目名称:grittier_ext,代码行数:10,代码来源:RemoveLikeTest.java

示例8: shouldNotRemoveLikeNotFound

import org.neo4j.test.server.HTTP; //导入方法依赖的package包/类
@Test
public void shouldNotRemoveLikeNotFound() {
    HTTP.POST(neo4j.httpURI().resolve("/v1/schema/create").toString());

    HTTP.Response response = HTTP.request("DELETE", neo4j.httpURI().resolve("/v1/users/markhneedham/likes/jexp/1490140299").toString(), null);
    HashMap actual  = response.content();
    Assert.assertEquals(400, response.status());
    Assert.assertEquals("Not liking Post.", actual.get("error"));
}
 
开发者ID:maxdemarzi,项目名称:grittier_ext,代码行数:10,代码来源:RemoveLikeTest.java

示例9: shouldRemoveBlock

import org.neo4j.test.server.HTTP; //导入方法依赖的package包/类
@Test
public void shouldRemoveBlock() {
    HTTP.POST(neo4j.httpURI().resolve("/v1/schema/create").toString());
    thrown.expect(UniformInterfaceException.class);
    HTTP.request("DELETE", neo4j.httpURI().resolve("/v1/users/maxdemarzi/blocks/jexp").toString(), null);
}
 
开发者ID:maxdemarzi,项目名称:grittier_ext,代码行数:7,代码来源:RemoveBlocksTest.java

示例10: shouldRemoveBlockToo

import org.neo4j.test.server.HTTP; //导入方法依赖的package包/类
@Test
public void shouldRemoveBlockToo() {
    HTTP.POST(neo4j.httpURI().resolve("/v1/schema/create").toString());
    thrown.expect(UniformInterfaceException.class);
    HTTP.request("DELETE", neo4j.httpURI().resolve("/v1/users/jexp/blocks/laexample").toString(), null);
}
 
开发者ID:maxdemarzi,项目名称:grittier_ext,代码行数:7,代码来源:RemoveBlocksTest.java

示例11: shouldRemoveFollows

import org.neo4j.test.server.HTTP; //导入方法依赖的package包/类
@Test
public void shouldRemoveFollows() {
    HTTP.POST(neo4j.httpURI().resolve("/v1/schema/create").toString());
    thrown.expect(UniformInterfaceException.class);
    HTTP.request("DELETE", neo4j.httpURI().resolve("/v1/users/maxdemarzi/follows/jexp").toString(), null);
}
 
开发者ID:maxdemarzi,项目名称:grittier_ext,代码行数:7,代码来源:RemoveFollowsTest.java

示例12: shouldRemoveFollowsToo

import org.neo4j.test.server.HTTP; //导入方法依赖的package包/类
@Test
public void shouldRemoveFollowsToo() {
    HTTP.POST(neo4j.httpURI().resolve("/v1/schema/create").toString());
    thrown.expect(UniformInterfaceException.class);
    HTTP.request("DELETE", neo4j.httpURI().resolve("/v1/users/laexample/follows/markhneedham").toString(), null);
}
 
开发者ID:maxdemarzi,项目名称:grittier_ext,代码行数:7,代码来源:RemoveFollowsTest.java

示例13: shouldRemoveLike

import org.neo4j.test.server.HTTP; //导入方法依赖的package包/类
@Test
public void shouldRemoveLike() {
    HTTP.POST(neo4j.httpURI().resolve("/v1/schema/create").toString());
    thrown.expect(UniformInterfaceException.class);
    HTTP.request("DELETE", neo4j.httpURI().resolve("/v1/users/maxdemarzi/likes/jexp/1490140299").toString(), null);
}
 
开发者ID:maxdemarzi,项目名称:grittier_ext,代码行数:7,代码来源:RemoveLikeTest.java

示例14: shouldRemoveLike2

import org.neo4j.test.server.HTTP; //导入方法依赖的package包/类
@Test
public void shouldRemoveLike2() {
    HTTP.POST(neo4j.httpURI().resolve("/v1/schema/create").toString());
    thrown.expect(UniformInterfaceException.class);
    HTTP.request("DELETE", neo4j.httpURI().resolve("/v1/users/maxdemarzi/likes/laexample/1490208700").toString(), null);
}
 
开发者ID:maxdemarzi,项目名称:grittier_ext,代码行数:7,代码来源:RemoveLikeTest.java


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