refactor: remove the unused placeholder lists
The generator sizes ad and moderator items itself and leaves their titles empty, so PlaceholderContent and its two models had no caller left. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
1 parent
ae3bb7960d
commit
7cdc3b3a41
5 files changed
+1
-64
No files matched your search
@@ -63,7 +63,7 @@ The app follows the MVC pattern and uses [WPF UI](https://github.com/lepoco/wpfu
|
|||||||
|
|
||||||
| Layer | Folder | Content |
|
| Layer | Folder | Content |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| Model | `src/Radiosender/Models` | `Song`, `ScheduleItem`, `AdSpot`, `ModeratorSegment`, `OpenverseTrack` |
|
| Model | `src/Radiosender/Models` | `Song`, `ScheduleItem`, `OpenverseTrack` |
|
||||||
| View | `src/Radiosender/Views` | `MainWindow` with navigation, one page per feature, `SongEditWindow` |
|
| View | `src/Radiosender/Views` | `MainWindow` with navigation, one page per feature, `SongEditWindow` |
|
||||||
| Controller | `src/Radiosender/Controllers` | `LibraryController`, `UploadController`, `OpenverseController`, `ScheduleController` |
|
| Controller | `src/Radiosender/Controllers` | `LibraryController`, `UploadController`, `OpenverseController`, `ScheduleController` |
|
||||||
| Services | `src/Radiosender/Services` | database, audio, schedule logic and API access used by the controllers |
|
| Services | `src/Radiosender/Services` | database, audio, schedule logic and API access used by the controllers |
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
namespace Radiosender.Models;
|
|
||||||
|
|
||||||
// Placeholder without audio: the schedule only needs a title and a length.
|
|
||||||
public record AdSpot(string Title, TimeSpan Duration);
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
namespace Radiosender.Models;
|
|
||||||
|
|
||||||
// Placeholder without audio: the schedule only needs a title and a length.
|
|
||||||
public record ModeratorSegment(string Title, TimeSpan Duration);
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
using Radiosender.Models;
|
|
||||||
|
|
||||||
namespace Radiosender.Services;
|
|
||||||
|
|
||||||
// In-memory seed data; varied lengths let the schedule generator fill gaps before the news.
|
|
||||||
public static class PlaceholderContent
|
|
||||||
{
|
|
||||||
public static IReadOnlyList<AdSpot> AdSpots { get; } =
|
|
||||||
[
|
|
||||||
new("Bakery Sonnenschein", TimeSpan.FromSeconds(30)),
|
|
||||||
new("Autohaus Berger", TimeSpan.FromSeconds(45)),
|
|
||||||
new("Stadtwerke Energy Tips", TimeSpan.FromSeconds(60)),
|
|
||||||
new("Furniture Outlet Sale", TimeSpan.FromSeconds(75)),
|
|
||||||
new("Regional Bank Savings", TimeSpan.FromSeconds(90)),
|
|
||||||
new("Summer Festival Preview", TimeSpan.FromMinutes(2)),
|
|
||||||
];
|
|
||||||
|
|
||||||
public static IReadOnlyList<ModeratorSegment> ModeratorSegments { get; } =
|
|
||||||
[
|
|
||||||
new("Station ID", TimeSpan.FromSeconds(30)),
|
|
||||||
new("Weather Update", TimeSpan.FromSeconds(60)),
|
|
||||||
new("Traffic Report", TimeSpan.FromSeconds(90)),
|
|
||||||
new("Song Introduction", TimeSpan.FromMinutes(2)),
|
|
||||||
new("Local Events", TimeSpan.FromSeconds(150)),
|
|
||||||
new("Listener Greetings", TimeSpan.FromMinutes(3)),
|
|
||||||
];
|
|
||||||
}
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
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);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in new issue
Block a user