Beispiel #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void shouldHandleEdgeValueWithoutProperties()
        internal virtual void ShouldHandleEdgeValueWithoutProperties()
        {
            NodeValue         startNode = VirtualValues.nodeValue(1L, Values.stringArray("L"), EMPTY_MAP);
            NodeValue         endNode   = VirtualValues.nodeValue(2L, Values.stringArray("L"), EMPTY_MAP);
            RelationshipValue rel       = VirtualValues.relationshipValue(42L, startNode, endNode, stringValue("R"), EMPTY_MAP);
            PrettyPrinter     printer   = new PrettyPrinter();

            // When
            rel.WriteTo(printer);

            // Then
            assertThat(printer.Value(), equalTo("-[id=42 :R]-"));
        }
Beispiel #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void shouldHandleEdgeValue()
        internal virtual void ShouldHandleEdgeValue()
        {
            // Given
            NodeValue         startNode = VirtualValues.nodeValue(1L, Values.stringArray("L"), EMPTY_MAP);
            NodeValue         endNode   = VirtualValues.nodeValue(2L, Values.stringArray("L"), EMPTY_MAP);
            RelationshipValue rel       = VirtualValues.relationshipValue(42L, startNode, endNode, stringValue("R"), Props("foo", intValue(42), "bar", list(intValue(1337), stringValue("baz"))));
            PrettyPrinter     printer   = new PrettyPrinter();

            // When
            rel.WriteTo(printer);

            // Then
            assertThat(printer.Value(), equalTo("-[id=42 :R {bar: [1337, \"baz\"], foo: 42}]-"));
        }