use of org.neo4j.shell.state.ListBoltResult in project neo4j by neo4j.
the class TableOutputFormatterTest method prettyPrintNode.
@Test
public void prettyPrintNode() {
// given
List<String> labels = asList("label1", "label2");
Map<String, Value> propertiesAsMap = new HashMap<>();
propertiesAsMap.put("prop1", Values.value("prop1_value"));
propertiesAsMap.put("prop2", Values.value("prop2_value"));
List<String> keys = asList("col1", "col2");
Value value = new NodeValue(new InternalNode(1, labels, propertiesAsMap));
Record record = new InternalRecord(keys, new Value[] { value });
// when
String actual = verbosePrinter.format(new ListBoltResult(asList(record), mock(ResultSummary.class)));
// then
assertThat(actual, containsString("| (:label1:label2 {prop2: \"prop2_value\", prop1: \"prop1_value\"}) |"));
}
Aggregations