Change from DataTestMethod to TestMethod due to obsolete attribute
This commit is contained in:
@@ -28,7 +28,7 @@ namespace Cloudflare.Core.Tests.Auth
|
||||
Assert.AreEqual(apiKey, clt.DefaultRequestHeaders.GetValues("X-Auth-Key").First());
|
||||
}
|
||||
|
||||
[DataTestMethod]
|
||||
[TestMethod]
|
||||
[DataRow(null)]
|
||||
[DataRow("")]
|
||||
[DataRow(" ")]
|
||||
@@ -44,7 +44,7 @@ namespace Cloudflare.Core.Tests.Auth
|
||||
// Assert - ArgumentNullException
|
||||
}
|
||||
|
||||
[DataTestMethod]
|
||||
[TestMethod]
|
||||
[DataRow(null)]
|
||||
[DataRow("")]
|
||||
[DataRow(" ")]
|
||||
@@ -60,7 +60,7 @@ namespace Cloudflare.Core.Tests.Auth
|
||||
// Assert - ArgumentNullException
|
||||
}
|
||||
|
||||
[DataTestMethod]
|
||||
[TestMethod]
|
||||
[DataRow("test")]
|
||||
[DataRow("test@example")]
|
||||
[DataRow("example.com")]
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace Cloudflare.Core.Tests.Auth
|
||||
Assert.AreEqual(apiToken, clt.DefaultRequestHeaders.Authorization.Parameter);
|
||||
}
|
||||
|
||||
[DataTestMethod]
|
||||
[TestMethod]
|
||||
[DataRow(null)]
|
||||
[DataRow("")]
|
||||
[DataRow(" ")]
|
||||
|
||||
@@ -179,7 +179,7 @@ namespace Cloudflare.Core.Tests
|
||||
// Assert - ArgumentOutOfRangeException
|
||||
}
|
||||
|
||||
[DataTestMethod]
|
||||
[TestMethod]
|
||||
[DataRow(-1)]
|
||||
[DataRow(11)]
|
||||
[ExpectedException(typeof(ArgumentOutOfRangeException))]
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace Cloudflare.Core.Tests.CloudflareClientTests
|
||||
// Assert - ObjectDisposedException
|
||||
}
|
||||
|
||||
[DataTestMethod]
|
||||
[TestMethod]
|
||||
[DataRow(null)]
|
||||
[DataRow("")]
|
||||
[DataRow(" ")]
|
||||
@@ -137,7 +137,7 @@ namespace Cloudflare.Core.Tests.CloudflareClientTests
|
||||
VerifyNoOtherCalls();
|
||||
}
|
||||
|
||||
[DataTestMethod]
|
||||
[TestMethod]
|
||||
[DataRow(HttpStatusCode.Unauthorized)]
|
||||
[DataRow(HttpStatusCode.Forbidden)]
|
||||
public async Task ShouldThrowAuthenticationExceptionOnStatusCode(HttpStatusCode statusCode)
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace Cloudflare.Core.Tests.CloudflareClientTests
|
||||
// Assert - ObjectDisposedException
|
||||
}
|
||||
|
||||
[DataTestMethod]
|
||||
[TestMethod]
|
||||
[DataRow(null)]
|
||||
[DataRow("")]
|
||||
[DataRow(" ")]
|
||||
@@ -137,7 +137,7 @@ namespace Cloudflare.Core.Tests.CloudflareClientTests
|
||||
VerifyNoOtherCalls();
|
||||
}
|
||||
|
||||
[DataTestMethod]
|
||||
[TestMethod]
|
||||
[DataRow(HttpStatusCode.Unauthorized)]
|
||||
[DataRow(HttpStatusCode.Forbidden)]
|
||||
public async Task ShouldThrowAuthenticationExceptionOnStatusCode(HttpStatusCode statusCode)
|
||||
@@ -165,7 +165,7 @@ namespace Cloudflare.Core.Tests.CloudflareClientTests
|
||||
}
|
||||
}
|
||||
|
||||
[DataTestMethod]
|
||||
[TestMethod]
|
||||
[DataRow(HttpStatusCode.Unauthorized)]
|
||||
[DataRow(HttpStatusCode.Forbidden)]
|
||||
public async Task ShouldThrowAuthenticationExceptionOnStatusCodeWithoutErrors(HttpStatusCode statusCode)
|
||||
@@ -193,7 +193,7 @@ namespace Cloudflare.Core.Tests.CloudflareClientTests
|
||||
}
|
||||
}
|
||||
|
||||
[DataTestMethod]
|
||||
[TestMethod]
|
||||
[DataRow(HttpStatusCode.Unauthorized)]
|
||||
[DataRow(HttpStatusCode.Forbidden)]
|
||||
[ExpectedException(typeof(CloudflareException))]
|
||||
|
||||
@@ -65,7 +65,7 @@ namespace Cloudflare.Core.Tests.CloudflareClientTests
|
||||
// Assert - ObjectDisposedException
|
||||
}
|
||||
|
||||
[DataTestMethod]
|
||||
[TestMethod]
|
||||
[DataRow(null)]
|
||||
[DataRow("")]
|
||||
[DataRow(" ")]
|
||||
@@ -197,7 +197,7 @@ namespace Cloudflare.Core.Tests.CloudflareClientTests
|
||||
VerifyNoOtherCalls();
|
||||
}
|
||||
|
||||
[DataTestMethod]
|
||||
[TestMethod]
|
||||
[DataRow(HttpStatusCode.Unauthorized)]
|
||||
[DataRow(HttpStatusCode.Forbidden)]
|
||||
public async Task ShouldThrowAuthenticationExceptionOnStatusCode(HttpStatusCode statusCode)
|
||||
|
||||
@@ -65,7 +65,7 @@ namespace Cloudflare.Core.Tests.CloudflareClientTests
|
||||
// Assert - ObjectDisposedException
|
||||
}
|
||||
|
||||
[DataTestMethod]
|
||||
[TestMethod]
|
||||
[DataRow(null)]
|
||||
[DataRow("")]
|
||||
[DataRow(" ")]
|
||||
@@ -245,7 +245,7 @@ namespace Cloudflare.Core.Tests.CloudflareClientTests
|
||||
_httpHandlerMock.Mock.Protected().Verify("SendAsync", Times.Once(), ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>());
|
||||
}
|
||||
|
||||
[DataTestMethod]
|
||||
[TestMethod]
|
||||
[DataRow(HttpStatusCode.Unauthorized)]
|
||||
[DataRow(HttpStatusCode.Forbidden)]
|
||||
public async Task ShouldThrowAuthenticationExceptionOnStatusCode(HttpStatusCode statusCode)
|
||||
|
||||
@@ -65,7 +65,7 @@ namespace Cloudflare.Core.Tests.CloudflareClientTests
|
||||
// Assert - ObjectDisposedException
|
||||
}
|
||||
|
||||
[DataTestMethod]
|
||||
[TestMethod]
|
||||
[DataRow(null)]
|
||||
[DataRow("")]
|
||||
[DataRow(" ")]
|
||||
@@ -245,7 +245,7 @@ namespace Cloudflare.Core.Tests.CloudflareClientTests
|
||||
_httpHandlerMock.Mock.Protected().Verify("SendAsync", Times.Once(), ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>());
|
||||
}
|
||||
|
||||
[DataTestMethod]
|
||||
[TestMethod]
|
||||
[DataRow(HttpStatusCode.Unauthorized)]
|
||||
[DataRow(HttpStatusCode.Forbidden)]
|
||||
public async Task ShouldThrowAuthenticationExceptionOnStatusCode(HttpStatusCode statusCode)
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace Cloudflare.Tests.Extensions
|
||||
// Assert - no exception thrown
|
||||
}
|
||||
|
||||
[DataTestMethod]
|
||||
[TestMethod]
|
||||
[DataRow(null)]
|
||||
[DataRow("")]
|
||||
[DataRow(" ")]
|
||||
@@ -46,7 +46,7 @@ namespace Cloudflare.Tests.Extensions
|
||||
// Assert - ArgumentException
|
||||
}
|
||||
|
||||
[DataTestMethod]
|
||||
[TestMethod]
|
||||
[DataRow("023e105f4ecef8ad9ca31a8372d0c35")]
|
||||
[DataRow("023e105f4ecef8ad9ca31a8372d0C353")]
|
||||
[DataRow("023e105f4ecef8ad9ca31a8372d0y353")]
|
||||
@@ -73,7 +73,7 @@ namespace Cloudflare.Tests.Extensions
|
||||
// Assert - no exception thrown
|
||||
}
|
||||
|
||||
[DataTestMethod]
|
||||
[TestMethod]
|
||||
[DataRow(null)]
|
||||
[DataRow("")]
|
||||
[DataRow(" ")]
|
||||
@@ -113,7 +113,7 @@ namespace Cloudflare.Tests.Extensions
|
||||
// Assert - no exception thrown
|
||||
}
|
||||
|
||||
[DataTestMethod]
|
||||
[TestMethod]
|
||||
[DataRow(null)]
|
||||
[DataRow("")]
|
||||
[DataRow(" ")]
|
||||
@@ -128,7 +128,7 @@ namespace Cloudflare.Tests.Extensions
|
||||
// Assert - ArgumentNullException
|
||||
}
|
||||
|
||||
[DataTestMethod]
|
||||
[TestMethod]
|
||||
[DataRow("test")]
|
||||
[DataRow("test@example")]
|
||||
[DataRow("example.com")]
|
||||
@@ -143,7 +143,7 @@ namespace Cloudflare.Tests.Extensions
|
||||
// Assert - ArgumentException
|
||||
}
|
||||
|
||||
[DataTestMethod]
|
||||
[TestMethod]
|
||||
[DataRow(null)]
|
||||
[DataRow("SomeExampleString")]
|
||||
public void ShouldValidateLength(string str)
|
||||
|
||||
Reference in New Issue
Block a user