Lines Matching refs:Throws

70             Assert.Throws<ArgumentNullException>(() => map.Add(0, nullValue));  in TestNullValues()
71 Assert.Throws<ArgumentNullException>(() => map[0] = nullValue); in TestNullValues()
80 Assert.Throws<ArgumentNullException>(() => map.Add(null, new ForeignMessage())); in Add_ForbidsNullKeys()
87 Assert.Throws<ArgumentNullException>(() => map[null] = new ForeignMessage()); in Indexer_ForbidsNullKeys()
187 Assert.Throws<ArgumentException>(() => map.Add("foo", "baz")); in Add_KeyAlreadyExists()
197 Assert.Throws<ArgumentException>(() => collection.Add(NewKeyValuePair("x", "z"))); in Add_Pair()
220 Assert.Throws<ArgumentNullException>(() => map.Remove(null)); in Remove_Key()
236 …Assert.Throws<ArgumentException>(() => collection.Remove(new KeyValuePair<string, string>(null, ""… in Remove_Pair()
266 Assert.Throws<KeyNotFoundException>(() => { var ignored = map["z"]; }); in Indexer_Get()
318 Assert.Throws<ArgumentException>(() => dictionary.Add("a", "duplicate")); in IDictionary_Add()
319 Assert.Throws<InvalidCastException>(() => dictionary.Add(new object(), "key is bad")); in IDictionary_Add()
320 Assert.Throws<InvalidCastException>(() => dictionary.Add("value is bad", new object())); in IDictionary_Add()
349 Assert.Throws<ArgumentNullException>(() => dictionary.Remove(null)); in IDictionary_Remove()
410 Assert.Throws<ArgumentNullException>(() => dictionary[null].GetHashCode()); in IDictionary_Indexer_Get()
422 Assert.Throws<InvalidCastException>(() => dictionary[5] = "x"); in IDictionary_Indexer_Set()
423 Assert.Throws<InvalidCastException>(() => dictionary["x"] = 5); in IDictionary_Indexer_Set()
424 Assert.Throws<ArgumentNullException>(() => dictionary[null] = "z"); in IDictionary_Indexer_Set()
425 Assert.Throws<ArgumentNullException>(() => dictionary["x"] = null); in IDictionary_Indexer_Set()
457 Assert.Throws<NotSupportedException>(() => keys.Clear()); in ViewsAreReadOnly()
458 Assert.Throws<NotSupportedException>(() => keys.Remove("a")); in ViewsAreReadOnly()
459 Assert.Throws<NotSupportedException>(() => keys.Add("a")); in ViewsAreReadOnly()
469 Assert.Throws<ArgumentException>(() => keys.CopyTo(array, 3)); in ViewCopyTo()
470 Assert.Throws<ArgumentOutOfRangeException>(() => keys.CopyTo(array, -1)); in ViewCopyTo()
483 Assert.Throws<ArgumentException>(() => keys.CopyTo(array, 3)); in NonGenericViewCopyTo()
484 Assert.Throws<ArgumentOutOfRangeException>(() => keys.CopyTo(array, -1)); in NonGenericViewCopyTo()
498 Assert.Throws<ArgumentNullException>(() => keys.Contains(null)); in KeysContains()
524 Assert.Throws<ArgumentException>(() => map.ToString()); in ToString_UnsupportedKeyType()