Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corefx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugh Bellamy <hughbellars@gmail.com>2017-06-28 07:13:26 +0300
committerDan Moseley <danmose@microsoft.com>2017-06-28 07:13:26 +0300
commit868f123881e520285ab09600380e38abdd457a06 (patch)
tree903d842b19e0033c9f3666138d03b78e099f0a6f /src/System.Runtime
parent310d2d5d455d40c265a873caad8612302c699c39 (diff)
Convert Assert.Throws<ArgumentException> to AssertExtensions (#21491)
Diffstat (limited to 'src/System.Runtime')
-rw-r--r--src/System.Runtime/tests/System/ArrayTests.netcoreapp.cs2
-rw-r--r--src/System.Runtime/tests/System/Reflection/AssemblyTests.cs4
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]