//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void snapshotShouldKeepData() public virtual void SnapshotShouldKeepData() { CopyOnWriteHashMap <int, string> map = new CopyOnWriteHashMap <int, string>(); map[0] = "0"; IDictionary <int, string> snapshot = map.Snapshot(); assertThat(snapshot[0], @is("0")); assertThat(map.Remove(0), @is("0")); assertThat(snapshot[0], @is("0")); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void keySetUnaffectedByChanges() public virtual void KeySetUnaffectedByChanges() { IDictionary <int, string> map = new CopyOnWriteHashMap <int, string>(); map[0] = "0"; map[1] = "1"; map[2] = "2"; assertThat(map, hasKey(0)); assertThat(map, hasKey(1)); assertThat(map, hasKey(2)); IEnumerator <int> keys = map.Keys.GetEnumerator(); map.Remove(1); IList <int> keysBeforeDeletion = Iterators.asList(keys); assertThat(keysBeforeDeletion, contains(0, 1, 2)); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void entrySetUnaffectedByChanges() public virtual void EntrySetUnaffectedByChanges() { IDictionary <int, string> map = new CopyOnWriteHashMap <int, string>(); map[0] = "0"; map[1] = "1"; map[2] = "2"; //JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @SuppressWarnings("unchecked") java.util.Map.Entry<int, String>[] allEntries = map.entrySet().toArray(new java.util.Map.Entry[0]); KeyValuePair <int, string>[] allEntries = map.SetOfKeyValuePairs().toArray(new DictionaryEntry[0]); assertThat(map.SetOfKeyValuePairs(), containsInAnyOrder(allEntries)); IEnumerator <KeyValuePair <int, string> > entries = map.SetOfKeyValuePairs().GetEnumerator(); map.Remove(1); IList <KeyValuePair <int, string> > entriesBeforeRemoval = Iterators.asList(entries); assertThat(entriesBeforeRemoval, containsInAnyOrder(allEntries)); }
public AbstractSetAnonymousInnerClass2(CopyOnWriteHashMap <K, V> outerInstance) { this.outerInstance = outerInstance; }
public AbstractCollectionAnonymousInnerClass(CopyOnWriteHashMap <K, V> outerInstance) { this.outerInstance = outerInstance; }