internal virtual void CompareToRemoved(PropertyEntry <T> entry) { BasicCompareTo(entry); try { entry.Value(); fail("Should throw IllegalStateException"); } catch (System.InvalidOperationException) { // OK } assertNull(Value()); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldListAddedRelationshipProperties() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void ShouldListAddedRelationshipProperties() { // Given Value prevValue = Values.of("prevValue"); int propertyKeyId = _ops.propertyKeyTokenHolder().getOrCreateId("theKey"); _state.relationshipDoReplaceProperty(1L, propertyKeyId, prevValue, Values.of("newValue")); _ops.withRelationship(1, 0, 0, 0, genericMap("theKey", prevValue)); // When IEnumerable <PropertyEntry <Relationship> > propertyEntries = Snapshot().assignedRelationshipProperties(); // Then PropertyEntry <Relationship> entry = single(propertyEntries); assertThat(entry.Key(), equalTo("theKey")); assertThat(entry.Value(), equalTo("newValue")); assertThat(entry.PreviouslyCommitedValue(), equalTo("prevValue")); assertThat(entry.Entity().Id, equalTo(1L)); }
//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)); }
internal virtual void CompareToAssigned(PropertyEntry <T> entry) { BasicCompareTo(entry); AssertEqualsMaybeNull(entry.Value(), Value(), entry.Entity(), entry.Key()); }