diff options
author | Hugh Bellamy <hughbellars@gmail.com> | 2017-06-28 07:13:26 +0300 |
---|---|---|
committer | Dan Moseley <danmose@microsoft.com> | 2017-06-28 07:13:26 +0300 |
commit | 868f123881e520285ab09600380e38abdd457a06 (patch) | |
tree | 903d842b19e0033c9f3666138d03b78e099f0a6f /src/System.Runtime | |
parent | 310d2d5d455d40c265a873caad8612302c699c39 (diff) |
Convert Assert.Throws<ArgumentException> to AssertExtensions (#21491)
Diffstat (limited to 'src/System.Runtime')
-rw-r--r-- | src/System.Runtime/tests/System/ArrayTests.netcoreapp.cs | 2 | ||||
-rw-r--r-- | src/System.Runtime/tests/System/Reflection/AssemblyTests.cs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/System.Runtime/tests/System/ArrayTests.netcoreapp.cs b/src/System.Runtime/tests/System/ArrayTests.netcoreapp.cs index d1492e7967..088e6e9654 100644 --- a/src/System.Runtime/tests/System/ArrayTests.netcoreapp.cs +++ b/src/System.Runtime/tests/System/ArrayTests.netcoreapp.cs @@ -137,7 +137,7 @@ namespace System.Tests [InlineData(3, 0, 4)] public static void Reverse_Generic_InvalidOffsetPlusLength_ThrowsArgumentException(int arrayLength, int index, int length) { - Assert.Throws<ArgumentException>(null, () => Array.Reverse(new string[arrayLength], index, length)); + AssertExtensions.Throws<ArgumentException>(null, () => Array.Reverse(new string[arrayLength], index, length)); } [Fact] diff --git a/src/System.Runtime/tests/System/Reflection/AssemblyTests.cs b/src/System.Runtime/tests/System/Reflection/AssemblyTests.cs index 41a1dcbda4..803516d8f6 100644 --- a/src/System.Runtime/tests/System/Reflection/AssemblyTests.cs +++ b/src/System.Runtime/tests/System/Reflection/AssemblyTests.cs @@ -422,8 +422,8 @@ namespace System.Reflection.Tests [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Assembly.LoadFrom() not supported on UapAot")] public void LoadFrom_EmptyAssemblyFile_ThrowsArgumentException() { - Assert.Throws<ArgumentException>((() => Assembly.LoadFrom(""))); - Assert.Throws<ArgumentException>((() => Assembly.UnsafeLoadFrom(""))); + AssertExtensions.Throws<ArgumentException>("path", null, (() => Assembly.LoadFrom(""))); + AssertExtensions.Throws<ArgumentException>("path", null, (() => Assembly.UnsafeLoadFrom(""))); } [Fact] |