diff --git a/test/Microsoft.AspNetCore.Cryptography.Internal.Test/project.json b/test/Microsoft.AspNetCore.Cryptography.Internal.Test/project.json
index 275ddd9910..1eac69a003 100644
--- a/test/Microsoft.AspNetCore.Cryptography.Internal.Test/project.json
+++ b/test/Microsoft.AspNetCore.Cryptography.Internal.Test/project.json
@@ -21,9 +21,6 @@
]
},
"net451": {
- "dependencies": {
- "xunit.runner.console": "2.1.0"
- },
"frameworkAssemblies": {
"System.Runtime": "",
"System.Threading.Tasks": ""
diff --git a/test/Microsoft.AspNetCore.Cryptography.KeyDerivation.Test/project.json b/test/Microsoft.AspNetCore.Cryptography.KeyDerivation.Test/project.json
index dbeaf4e74f..8a78b832fd 100644
--- a/test/Microsoft.AspNetCore.Cryptography.KeyDerivation.Test/project.json
+++ b/test/Microsoft.AspNetCore.Cryptography.KeyDerivation.Test/project.json
@@ -19,9 +19,6 @@
]
},
"net451": {
- "dependencies": {
- "xunit.runner.console": "2.1.0"
- },
"frameworkAssemblies": {
"System.Runtime": "",
"System.Threading.Tasks": ""
diff --git a/test/Microsoft.AspNetCore.DataProtection.Abstractions.Test/project.json b/test/Microsoft.AspNetCore.DataProtection.Abstractions.Test/project.json
index 3e077c2823..2452daa441 100644
--- a/test/Microsoft.AspNetCore.DataProtection.Abstractions.Test/project.json
+++ b/test/Microsoft.AspNetCore.DataProtection.Abstractions.Test/project.json
@@ -20,8 +20,7 @@
},
"net451": {
"dependencies": {
- "Moq": "4.2.1312.1622",
- "xunit.runner.console": "2.1.0"
+ "Moq": "4.2.1312.1622"
},
"frameworkAssemblies": {
"System.Runtime": "",
diff --git a/test/Microsoft.AspNetCore.DataProtection.Extensions.Test/project.json b/test/Microsoft.AspNetCore.DataProtection.Extensions.Test/project.json
index 8a1c50c1a2..a030268267 100644
--- a/test/Microsoft.AspNetCore.DataProtection.Extensions.Test/project.json
+++ b/test/Microsoft.AspNetCore.DataProtection.Extensions.Test/project.json
@@ -24,8 +24,7 @@
},
"net451": {
"dependencies": {
- "Moq": "4.2.1312.1622",
- "xunit.runner.console": "2.1.0"
+ "Moq": "4.2.1312.1622"
},
"frameworkAssemblies": {
"System.Runtime": "",
diff --git a/test/Microsoft.AspNetCore.DataProtection.Test.Shared/ExceptionAssert2.cs b/test/Microsoft.AspNetCore.DataProtection.Test.Shared/ExceptionAssert2.cs
index 36eab6e08d..ccc596b48c 100644
--- a/test/Microsoft.AspNetCore.DataProtection.Test.Shared/ExceptionAssert2.cs
+++ b/test/Microsoft.AspNetCore.DataProtection.Test.Shared/ExceptionAssert2.cs
@@ -9,20 +9,6 @@ namespace Microsoft.AspNetCore.Testing
{
internal static class ExceptionAssert2
{
- ///
- /// Verifies that the code throws an .
- ///
- /// A delegate to the code to be tested
- /// The name of the parameter that should throw the exception
- /// The that was thrown, when successful
- /// Thrown when an exception was not thrown, or when an exception of the incorrect type is thrown
- public static ArgumentNullException ThrowsArgumentNull(Action testCode, string paramName)
- {
- var ex = Assert.Throws(testCode);
- Assert.Equal(paramName, ex.ParamName);
- return ex;
- }
-
///
/// Verifies that the code throws a .
///
diff --git a/test/Microsoft.AspNetCore.DataProtection.Test/KeyManagement/KeyRingBasedDataProtectorTests.cs b/test/Microsoft.AspNetCore.DataProtection.Test/KeyManagement/KeyRingBasedDataProtectorTests.cs
index e85f52759a..2e510d5ccf 100644
--- a/test/Microsoft.AspNetCore.DataProtection.Test/KeyManagement/KeyRingBasedDataProtectorTests.cs
+++ b/test/Microsoft.AspNetCore.DataProtection.Test/KeyManagement/KeyRingBasedDataProtectorTests.cs
@@ -29,7 +29,7 @@ namespace Microsoft.AspNetCore.DataProtection.KeyManagement
newPurpose: "purpose");
// Act & assert
- ExceptionAssert2.ThrowsArgumentNull(() => protector.Protect(plaintext: null), "plaintext");
+ ExceptionAssert.ThrowsArgumentNull(() => protector.Protect(plaintext: null), "plaintext");
}
[Fact]
@@ -134,7 +134,7 @@ namespace Microsoft.AspNetCore.DataProtection.KeyManagement
newPurpose: "purpose");
// Act & assert
- ExceptionAssert2.ThrowsArgumentNull(() => protector.Unprotect(protectedData: null), "protectedData");
+ ExceptionAssert.ThrowsArgumentNull(() => protector.Unprotect(protectedData: null), "protectedData");
}
[Fact]
diff --git a/test/Microsoft.AspNetCore.DataProtection.Test/SecretTests.cs b/test/Microsoft.AspNetCore.DataProtection.Test/SecretTests.cs
index 0d3ab20696..b9342ad765 100644
--- a/test/Microsoft.AspNetCore.DataProtection.Test/SecretTests.cs
+++ b/test/Microsoft.AspNetCore.DataProtection.Test/SecretTests.cs
@@ -90,7 +90,7 @@ namespace Microsoft.AspNetCore.DataProtection
public void Ctor_Pointer_WithNullPointer_ThrowsArgumentNull()
{
// Act & assert
- ExceptionAssert2.ThrowsArgumentNull(
+ ExceptionAssert.ThrowsArgumentNull(
testCode: () => new Secret(null, 0),
paramName: "secret");
}
@@ -228,7 +228,7 @@ namespace Microsoft.AspNetCore.DataProtection
var secret = Secret.Random(16);
// Act & assert
- ExceptionAssert2.ThrowsArgumentNull(
+ ExceptionAssert.ThrowsArgumentNull(
testCode: () => secret.WriteSecretIntoBuffer(null, 100),
paramName: "buffer");
}
diff --git a/test/Microsoft.AspNetCore.DataProtection.Test/project.json b/test/Microsoft.AspNetCore.DataProtection.Test/project.json
index c551926e27..d879702159 100644
--- a/test/Microsoft.AspNetCore.DataProtection.Test/project.json
+++ b/test/Microsoft.AspNetCore.DataProtection.Test/project.json
@@ -24,8 +24,7 @@
},
"net451": {
"dependencies": {
- "Moq": "4.2.1312.1622",
- "xunit.runner.console": "2.1.0"
+ "Moq": "4.2.1312.1622"
},
"frameworkAssemblies": {
"System.Runtime": "",