test(historian-gateway): cover AlarmHistorianOptions.Validate MaxAttempts<=0 warning (FU-4)
The MaxAttempts<=0 warning branch in AlarmHistorianOptions.Validate() was the only one without a test (the sibling DrainIntervalSeconds/Capacity/ DeadLetterRetentionDays warnings are covered). Add the matching case. Closes FU-4. Claude-Session: https://claude.ai/code/session_012SDSQ3AcaXqPcBtDESBRii
This commit is contained in:
+7
@@ -152,6 +152,13 @@ public sealed class AlarmHistorianRegistrationTests
|
|||||||
opts.Validate().ShouldContain(w => w.Contains("DeadLetterRetentionDays"));
|
opts.Validate().ShouldContain(w => w.Contains("DeadLetterRetentionDays"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void Validate_warns_on_non_positive_max_attempts()
|
||||||
|
{
|
||||||
|
var opts = new AlarmHistorianOptions { Enabled = true, DatabasePath = "/abs/h.db", MaxAttempts = 0 };
|
||||||
|
opts.Validate().ShouldContain(w => w.Contains("MaxAttempts"));
|
||||||
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void Validate_accumulates_multiple_warnings()
|
public void Validate_accumulates_multiple_warnings()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user