Separate responsibilities: start-listening command, API-side JSON converters, bulk track endpoints, mix kinds
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user