Remove the unused content choice and the plain-text hold method
The link labyrinth held every catch that mattered, text-drip was never used. Flypaper__Drip__Content now only triggers the removed-settings warning. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4b946453fb
commit
c5167262b9
21 files changed
+26
-187
No files matched your search
@@ -6,14 +6,13 @@ namespace Flypaper.Tests.Core;
|
||||
|
||||
public sealed class HoldMethodParserTests
|
||||
{
|
||||
private static readonly HoldMethodInput Valid = new("Alternating", "50", "1000", "1", "64", "2048", true, "80", "/Backup-2024, /admin-old/x", "01:00:00", "7", "1.00:00:00");
|
||||
private static readonly HoldMethodInput Valid = new("50", "1000", "1", "64", "2048", true, "80", "/Backup-2024, /admin-old/x", "01:00:00", "7", "1.00:00:00");
|
||||
|
||||
[Fact]
|
||||
public void Parses_valid_input()
|
||||
{
|
||||
var settings = RuntimeSettingsParser.ParseHoldMethod(Valid).Settings.ShouldNotBeNull();
|
||||
|
||||
settings.Content.ShouldBe(DripContent.Alternating);
|
||||
settings.MinDelay.ShouldBe(TimeSpan.FromMilliseconds(50));
|
||||
settings.MaxDelay.ShouldBe(TimeSpan.FromSeconds(1));
|
||||
settings.MinChunkSize.ShouldBe(1);
|
||||
@@ -26,19 +25,6 @@ public sealed class HoldMethodParserTests
|
||||
settings.ToConfiguration().Keys.ShouldBe(SettingKeys.HoldMethod, ignoreOrder: true);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("html", DripContent.Html)]
|
||||
[InlineData("Text", DripContent.Text)]
|
||||
public void Accepts_content_case_insensitively(string value, DripContent expected) =>
|
||||
RuntimeSettingsParser.ParseHoldMethod(Valid with { Content = value }).Settings.ShouldNotBeNull().Content.ShouldBe(expected);
|
||||
|
||||
[Theory]
|
||||
[InlineData("")]
|
||||
[InlineData("fake-env")]
|
||||
[InlineData("7")]
|
||||
public void Rejects_unknown_content(string value) =>
|
||||
RuntimeSettingsParser.ParseHoldMethod(Valid with { Content = value }).Errors.Keys.ShouldBe([nameof(HoldMethodInput.Content)]);
|
||||
|
||||
[Theory]
|
||||
[InlineData("9", "1000")]
|
||||
[InlineData("50", "30001")]
|
||||
|
||||
Reference in new issue
Block a user