Add interstitial endpoints and enhance media and template functionalities: implement MapInterstitialEndpoints in Program.cs, add preview functionality for media assets in MediaEndpoints, and introduce template preview capabilities in TemplateEndpoints. Remove obsolete bumper settings from Channel and related classes to streamline configuration.
This commit is contained in:
@@ -56,13 +56,7 @@ public class ChannelHandlersTests
|
||||
"c",
|
||||
true,
|
||||
true,
|
||||
new BumperSettingsInput(
|
||||
BumperFont.Sans,
|
||||
5,
|
||||
BumperSelection.WeightedRandom,
|
||||
0.5,
|
||||
0.2
|
||||
),
|
||||
new BumperSettingsInput(BumperFont.Sans, BumperSelection.WeightedRandom),
|
||||
null
|
||||
),
|
||||
CancellationToken.None
|
||||
@@ -72,8 +66,7 @@ public class ChannelHandlersTests
|
||||
|
||||
await using var verify = fixture.New();
|
||||
var stored = await verify.Channels.FindAsync(channel.Id);
|
||||
Assert.Equal(0.5, stored!.BumperShowChangeChance);
|
||||
Assert.Equal(0.2, stored.BumperEpisodeChangeChance);
|
||||
Assert.Equal(BumperFont.Sans, stored!.BumperFont);
|
||||
Assert.Equal(BumperSelection.WeightedRandom, stored.BumperSelection);
|
||||
}
|
||||
|
||||
|
||||
@@ -40,13 +40,7 @@ public class ValidatorTests
|
||||
public void UpdateChannelSettings_ChecksRanges()
|
||||
{
|
||||
var v = new UpdateChannelSettingsCommandValidator();
|
||||
var bumper = new BumperSettingsInput(
|
||||
BumperFont.Sans,
|
||||
10,
|
||||
BumperSelection.Rotation,
|
||||
0.5,
|
||||
0.5
|
||||
);
|
||||
var bumper = new BumperSettingsInput(BumperFont.Sans, BumperSelection.WeightedRandom);
|
||||
|
||||
var good = new UpdateChannelSettingsCommand(
|
||||
Guid.NewGuid(),
|
||||
@@ -59,9 +53,6 @@ public class ValidatorTests
|
||||
Assert.True(v.Validate(good).IsValid);
|
||||
|
||||
Assert.False(v.Validate(good with { Name = "" }).IsValid);
|
||||
Assert.False(
|
||||
v.Validate(good with { Bumper = bumper with { ShowChangeChance = 2 } }).IsValid
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user