Updated core unit tests to latest recommendations

This commit is contained in:
2025-08-07 17:12:42 +02:00
parent 90d8320abc
commit 09e3c8ce48
11 changed files with 267 additions and 295 deletions

View File

@@ -1,7 +1,7 @@
using System.Net.Http;
using AMWD.Net.Api.Cloudflare;
namespace Cloudflare.Core.Tests.Auth
namespace Cloudflare.Tests.Auth
{
[TestClass]
public class ApiTokenAuthenticationTest
@@ -29,15 +29,12 @@ namespace Cloudflare.Core.Tests.Auth
[DataRow(null)]
[DataRow("")]
[DataRow(" ")]
[ExpectedException(typeof(ArgumentNullException))]
public void ShouldArgumentNullExceptionForEmailAddress(string apiToken)
{
// Arrange
// Act
new ApiTokenAuthentication(apiToken);
// Assert - ArgumentNullException
// Act & Assert
Assert.ThrowsExactly<ArgumentNullException>(() => new ApiTokenAuthentication(apiToken));
}
}
}