Add AdSpot and ModeratorSegment models with Title and Duration and a read-only in-memory seed list for each in PlaceholderContent. Ads and moderator talk are placeholders without audio, so no database table is needed. Lengths vary (ads 30 s to 2 min, moderator 30 s to 3 min) so the schedule generator can size these segments to end songs exactly before the news. Tests check the lists are non-empty with titles and positive durations. Refs #7 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
29 lines
818 B
C#
29 lines
818 B
C#
using Radiosender.Services;
|
|
|
|
namespace Radiosender.Tests;
|
|
|
|
public class PlaceholderContentTests
|
|
{
|
|
[Fact]
|
|
public void AdSpots_AreNonEmptyWithTitlesAndPositiveDurations()
|
|
{
|
|
Assert.NotEmpty(PlaceholderContent.AdSpots);
|
|
Assert.All(PlaceholderContent.AdSpots, ad =>
|
|
{
|
|
Assert.False(string.IsNullOrWhiteSpace(ad.Title));
|
|
Assert.True(ad.Duration > TimeSpan.Zero);
|
|
});
|
|
}
|
|
|
|
[Fact]
|
|
public void ModeratorSegments_AreNonEmptyWithTitlesAndPositiveDurations()
|
|
{
|
|
Assert.NotEmpty(PlaceholderContent.ModeratorSegments);
|
|
Assert.All(PlaceholderContent.ModeratorSegments, segment =>
|
|
{
|
|
Assert.False(string.IsNullOrWhiteSpace(segment.Title));
|
|
Assert.True(segment.Duration > TimeSpan.Zero);
|
|
});
|
|
}
|
|
}
|