//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)); }
//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 PropertyEntryImpl <T> FetchExpectedPropertyEntry <T>(IDictionary <T, IDictionary <string, PropertyEntryImpl <T> > > map, PropertyEntry <T> entry) where T : Org.Neo4j.Graphdb.PropertyContainer { T entity = entry.Entity(); bool hasEntity = map.ContainsKey(entity); if (_ignoreAdditionalData && !hasEntity) { return(null); } assertTrue("Unexpected entity " + entry, hasEntity); IDictionary <string, PropertyEntryImpl <T> > innerMap = map[entity]; PropertyEntryImpl <T> expectedEntry = innerMap.Remove(entry.Key()); if (expectedEntry == null && _ignoreAdditionalData) { return(null); } assertNotNull("Unexpected property entry " + entry, expectedEntry); if (innerMap.Count == 0) { map.Remove(entity); } return(expectedEntry); }
internal virtual void BasicCompareTo(PropertyEntry <T> entry) { assertEquals(entry.Entity(), Entity()); assertEquals(entry.Key(), Key()); AssertEqualsMaybeNull(entry.PreviouslyCommitedValue(), PreviouslyCommitedValue(), entry.Entity(), entry.Key()); }
internal virtual void CompareToAssigned(PropertyEntry <T> entry) { BasicCompareTo(entry); AssertEqualsMaybeNull(entry.Value(), Value(), entry.Entity(), entry.Key()); }