Lines Matching refs:collection
195 ICollection<KeyValuePair<string, string>> collection = map;
196 collection.Add(NewKeyValuePair("x", "y"));
198 Assert.Throws<ArgumentException>(() => collection.Add(NewKeyValuePair("x", "z")));
205 ICollection<KeyValuePair<string, string>> collection = map;
206 Assert.IsTrue(collection.Contains(NewKeyValuePair("x", "y")));
207 Assert.IsFalse(collection.Contains(NewKeyValuePair("x", "z")));
208 Assert.IsFalse(collection.Contains(NewKeyValuePair("z", "y")));
229 ICollection<KeyValuePair<string, string>> collection = map;
231 Assert.IsFalse(collection.Remove(NewKeyValuePair("wrong key", "bar")));
233 Assert.IsFalse(collection.Remove(NewKeyValuePair("foo", "wrong value")));
235 Assert.IsTrue(collection.Remove(NewKeyValuePair("foo", "bar")));
237 Assert.Throws<ArgumentException>(() => collection.Remove(new KeyValuePair<string, string>(null, "")));
245 ICollection<KeyValuePair<string, string>> collection = map;
247 collection.CopyTo(array, 1);