Ejemplo n.º 1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldListRemovedRelationshipProperties() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ShouldListRemovedRelationshipProperties()
        {
            // Given
            int   propertyKeyId = _ops.propertyKeyTokenHolder().getOrCreateId("theKey");
            Value prevValue     = Values.of("prevValue");

            _state.relationshipDoRemoveProperty(1L, propertyKeyId);
            _ops.withRelationship(1, 0, 0, 0, genericMap("theKey", prevValue));

            // When
            IEnumerable <PropertyEntry <Relationship> > propertyEntries = Snapshot().removedRelationshipProperties();

            // Then
            PropertyEntry <Relationship> entry = single(propertyEntries);

            assertThat(entry.Key(), equalTo("theKey"));
            assertThat(entry.PreviouslyCommitedValue(), equalTo("prevValue"));
            assertThat(entry.Entity().Id, equalTo(1L));
        }
Ejemplo n.º 2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldListAddedNodePropertiesProperties() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ShouldListAddedNodePropertiesProperties()
        {
            // Given
            int   propertyKeyId = _ops.propertyKeyTokenHolder().getOrCreateId("theKey");
            Value prevValue     = Values.of("prevValue");

            _state.nodeDoChangeProperty(1L, propertyKeyId, Values.of("newValue"));
            _ops.withNode(1, _noLabels, genericMap("theKey", prevValue));

            // When
            IEnumerable <PropertyEntry <Node> > propertyEntries = Snapshot().assignedNodeProperties();

            // Then
            PropertyEntry <Node> entry = single(propertyEntries);

            assertThat(entry.Key(), equalTo("theKey"));
            assertThat(entry.Value(), equalTo("newValue"));
            assertThat(entry.PreviouslyCommitedValue(), equalTo("prevValue"));
            assertThat(entry.Entity().Id, equalTo(1L));
        }
Ejemplo n.º 3
0
 internal virtual void BasicCompareTo(PropertyEntry <T> entry)
 {
     assertEquals(entry.Entity(), Entity());
     assertEquals(entry.Key(), Key());
     AssertEqualsMaybeNull(entry.PreviouslyCommitedValue(), PreviouslyCommitedValue(), entry.Entity(), entry.Key());
 }