Separate responsibilities: start-listening command, API-side JSON converters, bulk track endpoints, mix kinds

This commit is contained in:
2026-09-24 12:14:53 +02:00
parent 75d0c0817e
commit 0fa033faff
64 changed files with 2903 additions and 651 deletions
@@ -1,5 +1,6 @@
using Musify.Application.Mixes;
using Musify.Application.Tests.TestSupport;
using Musify.Domain.ValueObjects;
using Xunit;
namespace Musify.Application.Tests.Mixes;
@@ -13,13 +14,13 @@ public sealed class GetMixesByUserIdQueryHandlerTests : HandlerTestBase
{
var owner = TestEntities.User(1, "owner");
var other = TestEntities.User(2, "other");
var second = TestEntities.Mix(owner.Id, "Second", position: 1);
var first = TestEntities.Mix(owner.Id, "First", position: 0);
var theirs = TestEntities.Mix(other.Id, "Theirs");
var second = TestEntities.Mix(owner.Id, MixKind.Daily, position: 1);
var first = TestEntities.Mix(owner.Id, MixKind.Discovery, position: 0);
var theirs = TestEntities.Mix(other.Id);
await SeedAsync(owner, other, second, first, theirs);
var result = await CreateHandler().Handle(new GetMixesByUserIdQuery(owner.Id), TestContext.Current.CancellationToken);
Assert.Equal(["First", "Second"], result.Select(mix => mix.Title));
Assert.Equal([MixKind.Discovery, MixKind.Daily], result.Select(mix => mix.Kind));
}
[Fact]