Package org.springframework.data.neo4j.rest

Examples of org.springframework.data.neo4j.rest.RequestResult


        neoServer.stop();
    }

    @Test
    public void shouldInjectInterface() throws Exception {
        RequestResult requestResult = sendRequest( "testInterface" );

        Assert.assertEquals( 204, requestResult.getStatus() );
        Assert.assertEquals( 1, touched );
    }
View Full Code Here


        Assert.assertEquals( 1, touched );
    }

    @Test
    public void shouldWorkWithThirdPartyJaxrs() throws Exception {
        RequestResult requestResult = sendRequest( "testNoContext" );

        Assert.assertEquals( 204, requestResult.getStatus() );
    }
View Full Code Here

        person = persistedPerson("Michael", 35);
    }

    @Test
    public void testGetFriends() throws IOException {
        final RequestResult requestResult = RequestResult.extractFrom(createRequest("ext/TestServerPlugin/graphdb/person").post(ClientResponse.class, "{\"name\":\"" + person.getName() + "\"}"));
        assertEquals(200, requestResult.getStatus());
        final String result = requestResult.getEntity();
        final Map data = (Map) new ObjectMapper().readValue(result, Object.class);
        assertEquals(person.getName(),((Map)data.get("data")).get("name"));

    }
View Full Code Here

    public boolean existsForNodes( String indexName ) {
        return indexInfo( "node" ).containsKey( indexName );
    }

    private Map<String, ?> indexInfo( final String indexType ) {
        RequestResult requestResult = restRequest.get( "index/" + indexType );
        if ( restRequest.statusIs(requestResult, javax.ws.rs.core.Response.Status.NO_CONTENT ) ) return Collections.emptyMap();
        return (Map<String, ?>) restRequest.toMap(requestResult);
    }
View Full Code Here

TOP

Related Classes of org.springframework.data.neo4j.rest.RequestResult

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.