mirror of
https://github.com/GoodOlClint/PSProxmoxVE.git
synced 2026-08-28 16:06:59 +00:00
fix: resolve all C# compiler warnings (CS8604, CS8618, CS8603, CS1573, xUnit1012)
- CS8604: Use cmdlet's own Node property instead of nullable task.Node in WaitForTask calls across all VM cmdlets - CS8618: Make PveSession.ServerVersion nullable (PveVersion?) since it is set post-construction by PveAuthenticator - CS8603: Add null-forgiving operator where IsNullOrWhiteSpace guards guarantee non-null in PveHttpClient - CS1573: Add XML param documentation to all public service methods - xUnit1012: Make test parameters nullable (string?) for null test cases Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -56,7 +56,7 @@ namespace PSProxmoxVE.Core.Tests.Authentication
|
||||
[InlineData(null)]
|
||||
[InlineData("")]
|
||||
[InlineData(" ")]
|
||||
public void ValidateHostname_NullOrEmpty_Throws_ForCredentials(string hostname)
|
||||
public void ValidateHostname_NullOrEmpty_Throws_ForCredentials(string? hostname)
|
||||
{
|
||||
Assert.Throws<ArgumentException>(() =>
|
||||
PveAuthenticator.AuthenticateWithCredentials(hostname, ValidPort, false, "root@pam", "password"));
|
||||
@@ -66,7 +66,7 @@ namespace PSProxmoxVE.Core.Tests.Authentication
|
||||
[InlineData(null)]
|
||||
[InlineData("")]
|
||||
[InlineData(" ")]
|
||||
public void ValidateHostname_NullOrEmpty_Throws_ForApiToken(string hostname)
|
||||
public void ValidateHostname_NullOrEmpty_Throws_ForApiToken(string? hostname)
|
||||
{
|
||||
Assert.Throws<ArgumentException>(() =>
|
||||
PveAuthenticator.AuthenticateWithApiToken(hostname, ValidPort, false, "root@pam!mytoken=uuid"));
|
||||
@@ -76,7 +76,7 @@ namespace PSProxmoxVE.Core.Tests.Authentication
|
||||
[InlineData(null)]
|
||||
[InlineData("")]
|
||||
[InlineData(" ")]
|
||||
public void ValidateApiToken_NullOrEmpty_Throws(string token)
|
||||
public void ValidateApiToken_NullOrEmpty_Throws(string? token)
|
||||
{
|
||||
Assert.Throws<ArgumentException>(() =>
|
||||
PveAuthenticator.AuthenticateWithApiToken(ValidHostname, ValidPort, false, token));
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace PSProxmoxVE.Core.Tests.Authentication
|
||||
[InlineData(null)]
|
||||
[InlineData("")]
|
||||
[InlineData(" ")]
|
||||
public void Parse_NullOrEmpty_Throws(string input)
|
||||
public void Parse_NullOrEmpty_Throws(string? input)
|
||||
{
|
||||
Assert.Throws<ArgumentException>(() => PveVersion.Parse(input));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user