Adds domain Music aggregate

This commit is contained in:
BinaryAlley committed 2026-09-07 09:41:57 -07:00
1 parent bde08c7440
commit 3a720af29f
100 files changed
+13077 -558

No files matched your search

@@ -1,15 +1,15 @@
#region ========================================================================= USING =====================================================================================
using Lumina.Domain.Common.Primitives;
using Lumina.Domain.Common.ValueObjects.Metadata;
using Lumina.Domain.Core.BoundedContexts.AudioLibraryBoundedContext.AudioLibraryAggregate.ValueObjects;
using Lumina.Domain.Core.BoundedContexts.AudioLibraryBoundedContext.Common.ValueObjects;
using Lumina.Domain.Fixtures.Common.ValueObjects.Metadata;
using Lumina.Domain.Fixtures.Core.BoundedContexts.AudioLibraryBoundedContext.AudioLibraryAggregate.ValueObjects;
using Lumina.Domain.Fixtures.Core.BoundedContexts.AudioLibraryBoundedContext.Common.ValueObjects;
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
#endregion
namespace Lumina.Domain.UnitTests.Core.BoundedContexts.AudioLibraryBoundedContext.AudioLibraryAggregate.ValueObjects;
namespace Lumina.Domain.UnitTests.Core.BoundedContexts.AudioLibraryBoundedContext.Common.ValueObjects;
/// <summary>
/// Contains unit tests for the <see cref="AudioMetadata"/> class.
@@ -4,6 +4,7 @@ using Lumina.Domain.Core.BoundedContexts.MediaContributorBoundedContext.MediaCon
using Lumina.Domain.Core.BoundedContexts.MediaContributorBoundedContext.MediaContributorAggregate.ValueObjects;
using Lumina.Domain.Fixtures.Core.BoundedContexts.MediaContributorBoundedContext.MediaContributorAggregate;
using Lumina.Domain.Fixtures.Core.BoundedContexts.MediaContributorBoundedContext.MediaContributorAggregate.ValueObjects;
using Lumina.Domain.SharedKernel.Common.Enums.MediaContributors;
using System;
using System.Diagnostics.CodeAnalysis;
#endregion
@@ -31,7 +32,7 @@ public class MediaContributorTests
Optional<DateOnly> dateOfDeath = Optional<DateOnly>.None();
// Act
Result<MediaContributor> result = MediaContributor.Create(id, name, biography, dateOfBirth, dateOfDeath);
Result<MediaContributor> result = MediaContributor.Create(id, MediaContributorType.Person, name, biography, dateOfBirth, dateOfDeath);
// Assert
Assert.False(result.IsFailure);
@@ -51,7 +52,7 @@ public class MediaContributorTests
MediaContributorName name = _mediaContributorNameFixture.Create(displayName: "Jane Doe", legalName: Optional<string>.None());
// Act
Result<MediaContributor> result = MediaContributor.Create(_mediaContributorIdFixture.Create(), name, Optional<string>.None(), Optional<DateOnly>.None(), Optional<DateOnly>.None());
Result<MediaContributor> result = MediaContributor.Create(_mediaContributorIdFixture.Create(), MediaContributorType.Person, name, Optional<string>.None(), Optional<DateOnly>.None(), Optional<DateOnly>.None());
// Assert
Assert.False(result.IsFailure);
@@ -67,7 +68,7 @@ public class MediaContributorTests
MediaContributorName name = _mediaContributorNameFixture.Create(displayName: "Jane Doe", legalName: Optional<string>.None());
// Act
Result<MediaContributor> result = MediaContributor.Create(name);
Result<MediaContributor> result = MediaContributor.Create(MediaContributorType.Person, name);
// Assert
Assert.False(result.IsFailure);
@@ -1,24 +0,0 @@
#region ========================================================================= USING =====================================================================================
using Lumina.Domain.Core.BoundedContexts.VideoLibraryBoundedContext.MovieLibraryAggregate.Services;
using System;
using System.Diagnostics.CodeAnalysis;
#endregion
namespace Lumina.Domain.UnitTests.Core.BoundedContexts.VideoLibraryBoundedContext.MovieLibraryAggregate.Services;
/// <summary>
/// Contains unit tests for the <see cref="MovieLibraryService"/> class.
/// </summary>
[ExcludeFromCodeCoverage]
public class MovieLibraryServiceTests
{
[Fact]
public void Movies_WhenAccessed_ShouldThrowNotImplementedException()
{
// Arrange
MovieLibraryService sut = new();
// Act & Assert
Assert.Throws<NotImplementedException>(() => sut.Movies);
}
}
@@ -1,31 +0,0 @@
#region ========================================================================= USING =====================================================================================
using Lumina.Domain.Core.BoundedContexts.VideoLibraryBoundedContext.MovieLibraryAggregate.Services;
using Lumina.Domain.Core.BoundedContexts.VideoLibraryBoundedContext.Services;
using Lumina.Domain.Core.BoundedContexts.VideoLibraryBoundedContext.TvShowLibraryAggregate.Services;
using NSubstitute;
using System.Diagnostics.CodeAnalysis;
#endregion
namespace Lumina.Domain.UnitTests.Core.BoundedContexts.VideoLibraryBoundedContext.Services;
/// <summary>
/// Contains unit tests for the <see cref="VideoLibraryService"/> class.
/// </summary>
[ExcludeFromCodeCoverage]
public class VideoLibraryServiceTests
{
[Fact]
public void Constructor_WhenCalled_ShouldSetInjectedServices()
{
// Arrange
IMovieLibraryService movieLibraryService = Substitute.For<IMovieLibraryService>();
ITvShowLibraryService tvShowLibraryService = Substitute.For<ITvShowLibraryService>();
// Act
VideoLibraryService sut = new(movieLibraryService, tvShowLibraryService);
// Assert
Assert.Same(movieLibraryService, sut.MovieLibraryService);
Assert.Same(tvShowLibraryService, sut.TvShowLibraryService);
}
}
@@ -1,24 +0,0 @@
#region ========================================================================= USING =====================================================================================
using Lumina.Domain.Core.BoundedContexts.VideoLibraryBoundedContext.TvShowLibraryAggregate.Services;
using System;
using System.Diagnostics.CodeAnalysis;
#endregion
namespace Lumina.Domain.UnitTests.Core.BoundedContexts.VideoLibraryBoundedContext.TvShowLibraryAggregate.Services;
/// <summary>
/// Contains unit tests for the <see cref="TvShowLibraryService"/> class.
/// </summary>
[ExcludeFromCodeCoverage]
public class TvShowLibraryServiceTests
{
[Fact]
public void TvShows_WhenAccessed_ShouldThrowNotImplementedException()
{
// Arrange
TvShowLibraryService sut = new();
// Act & Assert
Assert.Throws<NotImplementedException>(() => sut.TvShows);
}
}
@@ -1,28 +0,0 @@
#region ========================================================================= USING =====================================================================================
using Lumina.Domain.Core.BoundedContexts.WrittenContentLibraryBoundedContext.BookLibraryAggregate.Services;
using Lumina.Domain.Core.BoundedContexts.WrittenContentLibraryBoundedContext.Services;
using NSubstitute;
using System.Diagnostics.CodeAnalysis;
#endregion
namespace Lumina.Domain.UnitTests.Core.BoundedContexts.WrittenContentLibraryBoundedContext.Services;
/// <summary>
/// Contains unit tests for the <see cref="WrittenContentLibraryService"/> class.
/// </summary>
[ExcludeFromCodeCoverage]
public class WrittenContentLibraryServiceTests
{
[Fact]
public void Constructor_WhenCalled_ShouldSetInjectedService()
{
// Arrange
IBookLibraryService bookLibraryService = Substitute.For<IBookLibraryService>();
// Act
WrittenContentLibraryService sut = new(bookLibraryService);
// Assert
Assert.Same(bookLibraryService, sut.BookLibraryService);
}
}