• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java JaxRsResponse类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.neo4j.server.rest.JaxRsResponse的典型用法代码示例。如果您正苦于以下问题:Java JaxRsResponse类的具体用法?Java JaxRsResponse怎么用?Java JaxRsResponse使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



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

示例1: shouldGetValidInfo

import org.neo4j.server.rest.JaxRsResponse; //导入依赖的package包/类
@Test
public void shouldGetValidInfo() throws IOException {
	NeoServer server = CommunityServerBuilder.server().onPort(7577)
			.withThirdPartyJaxRsPackage("org.amanzi.neo4j.csvtreeloader", MOUNT_POINT).build();
	server.start();

	RestRequest restRequest = new RestRequest(server.baseUri().resolve(MOUNT_POINT), CLIENT);
	String query = "service/csvtree";
	JaxRsResponse response = restRequest.get(query);
	assertEquals(200, response.getStatus());
	System.out.println("Got Import response: " + response.getEntity());
	JsonNode tree = objectMapper.readTree(response.getEntity().toString());
	String version = tree.get("version").asText();
	assertTrue("Version should be valid string", version.length() >= 5);
	
	server.stop();
}
 
开发者ID:craigtaverner,项目名称:csvtreeloader,代码行数:18,代码来源:CSVTreeLoaderServiceFunctionalTest.java


示例2: shouldNotGetIdentityKnowsBecauseOfMissingQueryParameters

import org.neo4j.server.rest.JaxRsResponse; //导入依赖的package包/类
@Test
public void shouldNotGetIdentityKnowsBecauseOfMissingQueryParameters() throws IOException {
    JaxRsResponse response = request.get("service/identity/knows");
    HashMap actual = objectMapper.readValue(response.getEntity(), HashMap.class);
    HashMap expected = objectMapper.readValue(
            pe.archety.Exception.missingQueryParameters.getResponse().getEntity().toString(), HashMap.class);
    assertEquals(expected, actual);
}
 
开发者ID:maxdemarzi,项目名称:archetype_extension,代码行数:9,代码来源:GetIdentityKnowsFunctionalTest.java


示例3: shouldNotGetIdentityKnowsBecauseOfInvalidEmailParameter

import org.neo4j.server.rest.JaxRsResponse; //导入依赖的package包/类
@Test
public void shouldNotGetIdentityKnowsBecauseOfInvalidEmailParameter() throws IOException {
    JaxRsResponse response = request.get("service/identity/knows?email=invalid");
    HashMap actual = objectMapper.readValue(response.getEntity(), HashMap.class);
    HashMap expected = objectMapper.readValue(
            pe.archety.Exception.invalidEmailParameter.getResponse().getEntity().toString(), HashMap.class);
    assertEquals(expected, actual);
}
 
开发者ID:maxdemarzi,项目名称:archetype_extension,代码行数:9,代码来源:GetIdentityKnowsFunctionalTest.java


示例4: shouldNotGetIdentityKnowsBecauseOfInvalidMD5HashParameter

import org.neo4j.server.rest.JaxRsResponse; //导入依赖的package包/类
@Test
public void shouldNotGetIdentityKnowsBecauseOfInvalidMD5HashParameter() throws IOException {
    JaxRsResponse response = request.get("service/identity/knows?md5hash=invalid");
    HashMap actual = objectMapper.readValue(response.getEntity(), HashMap.class);
    HashMap expected = objectMapper.readValue(
            Exception.invalidMD5HashParameter.getResponse().getEntity().toString(), HashMap.class);
    assertEquals(expected, actual);
}
 
开发者ID:maxdemarzi,项目名称:archetype_extension,代码行数:9,代码来源:GetIdentityKnowsFunctionalTest.java


示例5: shouldNotGetIdentityKnowsBecauseIdentityNotFound

import org.neo4j.server.rest.JaxRsResponse; //导入依赖的package包/类
@Test
public void shouldNotGetIdentityKnowsBecauseIdentityNotFound() throws IOException {
    JaxRsResponse response = request.get("service/identity/knows?email=" + notFoundEmail);
    HashMap actual = objectMapper.readValue(response.getEntity(), HashMap.class);
    HashMap expected = objectMapper.readValue(
            Exception.identityNotFound.getResponse().getEntity().toString(), HashMap.class);
    assertEquals(expected, actual);
}
 
开发者ID:maxdemarzi,项目名称:archetype_extension,代码行数:9,代码来源:GetIdentityKnowsFunctionalTest.java


示例6: shouldNotGetIdentityBecauseOfMissingQueryParameters

import org.neo4j.server.rest.JaxRsResponse; //导入依赖的package包/类
@Test
public void shouldNotGetIdentityBecauseOfMissingQueryParameters() throws IOException {
    JaxRsResponse response = request.get("service/identity");
    HashMap actual = objectMapper.readValue(response.getEntity(), HashMap.class);
    HashMap expected = objectMapper.readValue(
            Exception.missingQueryParameters.getResponse().getEntity().toString(), HashMap.class);
    assertEquals(expected, actual);
}
 
开发者ID:maxdemarzi,项目名称:archetype_extension,代码行数:9,代码来源:GetIdentityFunctionalTest.java


示例7: shouldNotGetIdentityBecauseOfInvalidEmailParameter

import org.neo4j.server.rest.JaxRsResponse; //导入依赖的package包/类
@Test
public void shouldNotGetIdentityBecauseOfInvalidEmailParameter() throws IOException {
    JaxRsResponse response = request.get("service/identity?email=invalid");
    HashMap actual = objectMapper.readValue(response.getEntity(), HashMap.class);
    HashMap expected = objectMapper.readValue(
            Exception.invalidEmailParameter.getResponse().getEntity().toString(), HashMap.class);
    assertEquals(expected, actual);
}
 
开发者ID:maxdemarzi,项目名称:archetype_extension,代码行数:9,代码来源:GetIdentityFunctionalTest.java


示例8: shouldNotGetIdentityBecauseOfInvalidMD5HashParameter

import org.neo4j.server.rest.JaxRsResponse; //导入依赖的package包/类
@Test
public void shouldNotGetIdentityBecauseOfInvalidMD5HashParameter() throws IOException {
    JaxRsResponse response = request.get("service/identity?md5hash=invalid");
    HashMap actual = objectMapper.readValue(response.getEntity(), HashMap.class);
    HashMap expected = objectMapper.readValue(
            Exception.invalidMD5HashParameter.getResponse().getEntity().toString(), HashMap.class);
    assertEquals(expected, actual);
}
 
开发者ID:maxdemarzi,项目名称:archetype_extension,代码行数:9,代码来源:GetIdentityFunctionalTest.java


示例9: shouldNotGetIdentityBecauseIdentityNotFound

import org.neo4j.server.rest.JaxRsResponse; //导入依赖的package包/类
@Test
public void shouldNotGetIdentityBecauseIdentityNotFound() throws IOException {
    JaxRsResponse response = request.get("service/identity?email=" + notFoundEmail);
    HashMap actual = objectMapper.readValue(response.getEntity(), HashMap.class);
    HashMap expected = objectMapper.readValue(
            Exception.identityNotFound.getResponse().getEntity().toString(), HashMap.class);
    assertEquals(expected, actual);
}
 
开发者ID:maxdemarzi,项目名称:archetype_extension,代码行数:9,代码来源:GetIdentityFunctionalTest.java


示例10: shouldNotGetIdentityHatesBecauseOfMissingQueryParameters

import org.neo4j.server.rest.JaxRsResponse; //导入依赖的package包/类
@Test
public void shouldNotGetIdentityHatesBecauseOfMissingQueryParameters() throws IOException {
    JaxRsResponse response = request.get("service/identity/hates");
    HashMap actual = objectMapper.readValue(response.getEntity(), HashMap.class);
    HashMap expected = objectMapper.readValue(
            pe.archety.Exception.missingQueryParameters.getResponse().getEntity().toString(), HashMap.class);
    assertEquals(expected, actual);
}
 
开发者ID:maxdemarzi,项目名称:archetype_extension,代码行数:9,代码来源:GetIdentityHatesFunctionalTest.java


示例11: shouldNotGetIdentityHatesBecauseOfInvalidEmailParameter

import org.neo4j.server.rest.JaxRsResponse; //导入依赖的package包/类
@Test
public void shouldNotGetIdentityHatesBecauseOfInvalidEmailParameter() throws IOException {
    JaxRsResponse response = request.get("service/identity/hates?email=invalid");
    HashMap actual = objectMapper.readValue(response.getEntity(), HashMap.class);
    HashMap expected = objectMapper.readValue(
            pe.archety.Exception.invalidEmailParameter.getResponse().getEntity().toString(), HashMap.class);
    assertEquals(expected, actual);
}
 
开发者ID:maxdemarzi,项目名称:archetype_extension,代码行数:9,代码来源:GetIdentityHatesFunctionalTest.java


示例12: shouldNotGetIdentityHatesBecauseOfInvalidMD5HashParameter

import org.neo4j.server.rest.JaxRsResponse; //导入依赖的package包/类
@Test
public void shouldNotGetIdentityHatesBecauseOfInvalidMD5HashParameter() throws IOException {
    JaxRsResponse response = request.get("service/identity/hates?md5hash=invalid");
    HashMap actual = objectMapper.readValue(response.getEntity(), HashMap.class);
    HashMap expected = objectMapper.readValue(
            Exception.invalidMD5HashParameter.getResponse().getEntity().toString(), HashMap.class);
    assertEquals(expected, actual);
}
 
开发者ID:maxdemarzi,项目名称:archetype_extension,代码行数:9,代码来源:GetIdentityHatesFunctionalTest.java


示例13: shouldNotGetIdentityHatesBecauseIdentityNotFound

import org.neo4j.server.rest.JaxRsResponse; //导入依赖的package包/类
@Test
public void shouldNotGetIdentityHatesBecauseIdentityNotFound() throws IOException {
    JaxRsResponse response = request.get("service/identity/hates?email=" + notFoundEmail);
    HashMap actual = objectMapper.readValue(response.getEntity(), HashMap.class);
    HashMap expected = objectMapper.readValue(
            Exception.identityNotFound.getResponse().getEntity().toString(), HashMap.class);
    assertEquals(expected, actual);
}
 
开发者ID:maxdemarzi,项目名称:archetype_extension,代码行数:9,代码来源:GetIdentityHatesFunctionalTest.java


示例14: shouldMigrate

import org.neo4j.server.rest.JaxRsResponse; //导入依赖的package包/类
@Test
public void shouldMigrate() {
    JaxRsResponse response = request.get("service/migrate");
    assertEquals("Migrated!", response.getEntity());
    response = request.get("service/migrate");
    assertEquals("Already Migrated!", response.getEntity());
}
 
开发者ID:maxdemarzi,项目名称:archetype_extension,代码行数:8,代码来源:ArchetypeServiceFunctionalTest.java


示例15: shouldNotCreateIdentityBecauseOfMissingQueryParameters

import org.neo4j.server.rest.JaxRsResponse; //导入依赖的package包/类
@Test
public void shouldNotCreateIdentityBecauseOfMissingQueryParameters() throws IOException {
    JaxRsResponse response = request.post("service/identity", "");
    HashMap actual = objectMapper.readValue(response.getEntity(), HashMap.class);
    HashMap expected = objectMapper.readValue(
            pe.archety.Exception.missingQueryParameters.getResponse().getEntity().toString(), HashMap.class);
    assertEquals(expected, actual);
}
 
开发者ID:maxdemarzi,项目名称:archetype_extension,代码行数:9,代码来源:CreateIdentityFunctionalTest.java


示例16: shouldNotCreateIdentityBecauseOfInvalidEmailParameter

import org.neo4j.server.rest.JaxRsResponse; //导入依赖的package包/类
@Test
public void shouldNotCreateIdentityBecauseOfInvalidEmailParameter() throws IOException {
    JaxRsResponse response = request.post("service/identity?email=invalid", "");
    HashMap actual = objectMapper.readValue(response.getEntity(), HashMap.class);
    HashMap expected = objectMapper.readValue(
            Exception.invalidEmailParameter.getResponse().getEntity().toString(), HashMap.class);
    assertEquals(expected, actual);
}
 
开发者ID:maxdemarzi,项目名称:archetype_extension,代码行数:9,代码来源:CreateIdentityFunctionalTest.java


示例17: shouldNotCreateIdentityBecauseOfInvalidMD5HashParameter

import org.neo4j.server.rest.JaxRsResponse; //导入依赖的package包/类
@Test
public void shouldNotCreateIdentityBecauseOfInvalidMD5HashParameter() throws IOException {
    JaxRsResponse response = request.post("service/identity?md5hash=invalid", "");
    HashMap actual = objectMapper.readValue(response.getEntity(), HashMap.class);
    HashMap expected = objectMapper.readValue(
            Exception.invalidMD5HashParameter.getResponse().getEntity().toString(), HashMap.class);
    assertEquals(expected, actual);
}
 
开发者ID:maxdemarzi,项目名称:archetype_extension,代码行数:9,代码来源:CreateIdentityFunctionalTest.java


示例18: shouldNotCreateIdentityBecauseOfError

import org.neo4j.server.rest.JaxRsResponse; //导入依赖的package包/类
@Test
public void shouldNotCreateIdentityBecauseOfError() throws IOException {
    server.getDatabase().getGraph().shutdown();
    JaxRsResponse response = request.post("service/identity?md5hash=" + validMD5Hash2, "");
    HashMap actual = objectMapper.readValue(response.getEntity(), HashMap.class);
    HashMap expected = objectMapper.readValue(
            Exception.identityNotCreated.getResponse().getEntity().toString(), HashMap.class);
    assertEquals(expected, actual);
}
 
开发者ID:maxdemarzi,项目名称:archetype_extension,代码行数:10,代码来源:CreateIdentityFunctionalTest.java


示例19: shouldNotGetPageBecauseOfMissingQueryParameters

import org.neo4j.server.rest.JaxRsResponse; //导入依赖的package包/类
@Test
public void shouldNotGetPageBecauseOfMissingQueryParameters() throws IOException {
    JaxRsResponse response = request.get("service/page");
    HashMap actual = objectMapper.readValue(response.getEntity(), HashMap.class);
    HashMap expected = objectMapper.readValue(
            pe.archety.Exception.missingQueryParameters.getResponse().getEntity().toString(), HashMap.class);
    assertEquals(expected, actual);
}
 
开发者ID:maxdemarzi,项目名称:archetype_extension,代码行数:9,代码来源:GetPageFunctionalTest.java


示例20: shouldNotGetPageBecausePageNotFound

import org.neo4j.server.rest.JaxRsResponse; //导入依赖的package包/类
@Test
public void shouldNotGetPageBecausePageNotFound() throws IOException {
    JaxRsResponse response = request.get("service/page?url=" + validURL2);
    HashMap actual = objectMapper.readValue(response.getEntity(), HashMap.class);
    HashMap expected = objectMapper.readValue(
            Exception.pageNotFound.getResponse().getEntity().toString(), HashMap.class);
    assertEquals(expected, actual);
}
 
开发者ID:maxdemarzi,项目名称:archetype_extension,代码行数:9,代码来源:GetPageFunctionalTest.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Error类代码示例发布时间:2022-05-22
下一篇:
Java ContextAware类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap