use of org.neo4j.values.virtual.RelationshipReference in project neo4j by neo4j.
the class TruncatedQuerySnapshotTest method shouldTruncateRelationship.
@Test
void shouldTruncateRelationship() {
// when
TruncatedQuerySnapshot x = new TruncatedQuerySnapshot(null, "", null, map("r", RELATIONSHIP), -1L, -1L, -1L, 100);
// then
AnyValue truncatedRelationship = x.queryParameters.get("r");
assertTrue(truncatedRelationship instanceof RelationshipReference);
assertEquals(RELATIONSHIP.id(), ((RelationshipReference) truncatedRelationship).id());
}
use of org.neo4j.values.virtual.RelationshipReference in project neo4j by neo4j.
the class PrettyPrinterTest method shouldHandleRelationshipReference.
@Test
void shouldHandleRelationshipReference() {
// Given
RelationshipReference rel = VirtualValues.relationship(42L);
PrettyPrinter printer = new PrettyPrinter();
// When
rel.writeTo(printer);
// Then
assertThat(printer.value()).isEqualTo("-[id=42]-");
}
Aggregations