use of org.neo4j.values.virtual.NodeReference in project neo4j by neo4j.
the class TruncatedQuerySnapshotTest method shouldTruncateNode.
@Test
void shouldTruncateNode() {
// when
TruncatedQuerySnapshot x = new TruncatedQuerySnapshot(null, "", null, map("n", NODE), -1L, -1L, -1L, 100);
// then
AnyValue truncatedNode = x.queryParameters.get("n");
assertTrue(truncatedNode instanceof NodeReference);
assertEquals(NODE.id(), ((NodeReference) truncatedNode).id());
}
use of org.neo4j.values.virtual.NodeReference in project neo4j by neo4j.
the class PrettyPrinterTest method shouldHandleNodeReference.
@Test
void shouldHandleNodeReference() {
// Given
NodeReference node = VirtualValues.node(42L);
PrettyPrinter printer = new PrettyPrinter();
// When
node.writeTo(printer);
// Then
assertThat(printer.value()).isEqualTo("(id=42)");
}
Aggregations