Update SS/SSR Parameter

This commit is contained in:
ChsBuffer
2021-03-19 03:55:53 +08:00
parent 18168c3a4e
commit 95de42e778
3 changed files with 16 additions and 8 deletions

View File

@@ -74,6 +74,13 @@ namespace UnitTest
public string? udp { get; set; } = null;
}
private class Number : ParameterBase
{
public ushort a { get; set; } = 1;
public int b { get; set; } = 1;
}
[TestMethod]
public void Test()
{
@@ -85,6 +92,7 @@ namespace UnitTest
Assert.AreEqual(new FlagAndOptional().ToString(), "--a");
Assert.ThrowsException<RequiredArgumentValueInvalidException>(() => { _ = new RequiredEmpty().ToString(); });
Assert.ThrowsException<RequiredArgumentValueInvalidException>(() => { _ = new RequiredNull().ToString(); });
Assert.AreEqual(new Number().ToString(), "--a 1 --b 1");
}
}
}