use of org.neo4j.test.Property in project neo4j by neo4j.
the class GraphExtractionWriterTest method assertNode.
// Helpers
private static void assertNode(String id, JsonNode nodes, List<String> labels, Property... properties) {
JsonNode node = get(nodes, id);
assertListEquals("Node[" + id + "].labels", labels, node.get("labels"));
JsonNode props = node.get("properties");
assertEquals("length( Node[" + id + "].properties )", properties.length, props.size());
for (Property property : properties) {
assertJsonEquals("Node[" + id + "].properties[" + property.key() + "]", property.value(), props.get(property.key()));
}
}
use of org.neo4j.test.Property in project neo4j by neo4j.
the class GraphExtractionWriterTest method assertRelationship.
private static void assertRelationship(String id, JsonNode relationships, String startNodeId, String type, String endNodeId, Property... properties) {
JsonNode relationship = get(relationships, id);
assertEquals("Relationship[" + id + "].labels", type, relationship.get("type").getTextValue());
assertEquals("Relationship[" + id + "].startNode", startNodeId, relationship.get("startNode").getTextValue());
assertEquals("Relationship[" + id + "].endNode", endNodeId, relationship.get("endNode").getTextValue());
JsonNode props = relationship.get("properties");
assertEquals("length( Relationship[" + id + "].properties )", properties.length, props.size());
for (Property property : properties) {
assertJsonEquals("Relationship[" + id + "].properties[" + property.key() + "]", property.value(), props.get(property.key()));
}
}