Search in sources :

Example 16 with ExecutionResult

use of org.neo4j.cypher.internal.javacompat.ExecutionResult in project neo4j by neo4j.

the class ExportTest method testEscapingOfNodeStringPropertyValue.

@Test
public void testEscapingOfNodeStringPropertyValue() throws Exception {
    Node n = gdb.createNode();
    n.setProperty("name", "Brutus \"Brutal\" Howell");
    final ExecutionResult result = result("node", n);
    final SubGraph graph = CypherResultSubGraph.from(result, gdb, false);
    assertEquals("create (_" + n.getId() + " {`name`:\"Brutus \\\"Brutal\\\" Howell\"})" + lineSeparator() + ";" + lineSeparator(), doExportGraph(graph));
}
Also used : Node(org.neo4j.graphdb.Node) ExecutionResult(org.neo4j.cypher.internal.javacompat.ExecutionResult) Test(org.junit.Test)

Aggregations

ExecutionResult (org.neo4j.cypher.internal.javacompat.ExecutionResult)16 Test (org.junit.Test)15 Node (org.neo4j.graphdb.Node)15 Relationship (org.neo4j.graphdb.Relationship)4 Label (org.neo4j.graphdb.Label)2 Collections.singletonMap (java.util.Collections.singletonMap)1 Map (java.util.Map)1 InvocationOnMock (org.mockito.invocation.InvocationOnMock)1 Path (org.neo4j.graphdb.Path)1 ResourceIterator (org.neo4j.graphdb.ResourceIterator)1