本文整理汇总了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"));
}
示例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"));
}
示例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"));
}
示例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);
}
示例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"));
}
示例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"));
}
示例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"));
}
示例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"));
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}