fix(config): centralize port wording, harden HostPort/key guards, doc null/singleton semantics, add tests
This commit is contained in:
@@ -33,6 +33,7 @@ public sealed class ValidationBuilderTests
|
||||
[InlineData("host", false)]
|
||||
[InlineData("host:0", false)]
|
||||
[InlineData("host:notaport", false)]
|
||||
[InlineData("::1", false)]
|
||||
public void HostPort_validates_endpoint(string value, bool valid)
|
||||
{
|
||||
var b = new ValidationBuilder();
|
||||
@@ -56,6 +57,15 @@ public sealed class ValidationBuilderTests
|
||||
Assert.True(b.IsValid);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void OneOf_null_value_fails()
|
||||
{
|
||||
var b = new ValidationBuilder();
|
||||
b.OneOf(null, new[] { "Central", "Site" }, "X:Role");
|
||||
Assert.False(b.IsValid);
|
||||
Assert.Contains(b.Failures, f => f.Contains("X:Role"));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void MinCount_requires_minimum()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user