//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldConvertAddRemoveToChange() public virtual void ShouldConvertAddRemoveToChange() { // Given PropertyContainerStateImpl state = new PropertyContainerStateImpl(1, OnHeapCollectionsFactory.INSTANCE); // When state.RemoveProperty(4); state.AddProperty(4, Values.of("another value")); // Then assertThat(Iterators.asList(state.ChangedProperties()), equalTo(asList(new PropertyKeyValue(4, Values.of("another value"))))); //JAVA TO C# CONVERTER TODO TASK: Java iterators are only converted within the context of 'while' and 'for' loops: assertFalse(state.AddedProperties().hasNext()); assertTrue(state.RemovedProperties().Empty); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldListAddedPropertiesEvenIfPropertiesHaveBeenReplaced() public virtual void ShouldListAddedPropertiesEvenIfPropertiesHaveBeenReplaced() { // Given PropertyContainerStateImpl state = new PropertyContainerStateImpl(1, OnHeapCollectionsFactory.INSTANCE); state.AddProperty(1, Values.of("Hello")); state.AddProperty(1, Values.of("WAT")); state.AddProperty(2, Values.of("Hello")); // When IEnumerator <StorageProperty> added = state.AddedProperties(); // Then assertThat(Iterators.asList(added), equalTo(asList(new PropertyKeyValue(1, Values.of("WAT")), new PropertyKeyValue(2, Values.of("Hello"))))); }