14 references to Throws
Microsoft.CodeAnalysis.UnitTests (13)
Collections\List\ICollection.Generic.Tests.cs (1)
514
Assert.
Throws
(ICollection_Generic_CopyTo_IndexLargerThanArrayCount_ThrowType, () => collection.CopyTo(array, count + 1));
Collections\List\ICollection.NonGeneric.Tests.cs (6)
194
Assert.
Throws
(ICollection_NonGeneric_CopyTo_TwoDimensionArray_ThrowType, () => collection.CopyTo(arr, 0));
206
Assert.
Throws
(ICollection_NonGeneric_CopyTo_NonZeroLowerBound_ThrowType, () => collection.CopyTo(arr, 0));
218
Assert.
Throws
(ICollection_NonGeneric_CopyTo_ArrayOfIncorrectValueType_ThrowType, () => collection.CopyTo(array, 0));
230
Assert.
Throws
(ICollection_NonGeneric_CopyTo_ArrayOfIncorrectReferenceType_ThrowType, () => collection.CopyTo(array, 0));
242
Assert.
Throws
(ICollection_NonGeneric_CopyTo_ArrayOfEnumType_ThrowType, () => collection.CopyTo(enumArr, 0));
275
Assert.
Throws
(ICollection_NonGeneric_CopyTo_IndexLargerThanArrayCount_ThrowType, () => collection.CopyTo(array, count + 1));
Collections\List\IList.NonGeneric.Tests.cs (6)
739
Assert.
Throws
(IList_NonGeneric_Item_InvalidIndex_ThrowType, () => list.Insert(-1, validAdd));
740
Assert.
Throws
(IList_NonGeneric_Item_InvalidIndex_ThrowType, () => list.Insert(int.MinValue, validAdd));
1017
Assert.
Throws
(IList_NonGeneric_Item_InvalidIndex_ThrowType, () => list.RemoveAt(-1));
1018
Assert.
Throws
(IList_NonGeneric_Item_InvalidIndex_ThrowType, () => list.RemoveAt(int.MinValue));
1031
Assert.
Throws
(IList_NonGeneric_Item_InvalidIndex_ThrowType, () => list.RemoveAt(count));
1032
Assert.
Throws
(IList_NonGeneric_Item_InvalidIndex_ThrowType, () => list.RemoveAt(count + 1));
Microsoft.DotNet.XUnitAssert.Tests (1)
ExceptionAssertsTests.cs (1)
475
Assert.
Throws
(typeof(ArgumentException), () => { });