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,5 +1,6 @@
#region ========================================================================= USING =====================================================================================
using Lumina.Contracts.DTO.Common;
using Lumina.Domain.SharedKernel.Common.Enums.Common;
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
@@ -35,7 +36,7 @@ public class ReleaseInfoDtoFixture
int? originalReleaseYear = null,
DateOnly? reReleaseDate = null,
int? reReleaseYear = null,
string? releaseCountry = null,
ReleaseCountry? releaseCountry = null,
string? releaseVersion = null,
bool includeOriginalReleaseDate = true,
bool includeOriginalReleaseYear = true,
@@ -1,10 +1,11 @@
#region ========================================================================= USING =====================================================================================
#region ========================================================================= USING =====================================================================================
using Bogus;
using Lumina.Contracts.DTO.Common;
using Lumina.Contracts.DTO.MediaContributors;
using Lumina.Contracts.DTO.MediaLibrary.WrittenContentLibrary.BookLibrary;
using Lumina.Contracts.Fixtures.Core.DTO.Common;
using Lumina.Domain.SharedKernel.Common.Enums.BookLibrary;
using Lumina.Domain.SharedKernel.Common.Enums.Common;
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
@@ -97,7 +98,7 @@ public class BookMetadataDtoFixture
releaseInfo ?? (includeOptionalProperties ? _releaseInfoDtoFixture.Create(
originalReleaseDate: new DateOnly(releaseYear, 1, 1),
originalReleaseYear: releaseYear,
releaseCountry: _faker.Address.CountryCode()) : null),
releaseCountry: _faker.PickRandom<ReleaseCountry>()) : null),
genres ?? (includeOptionalProperties ? [_genreDtoFixture.Create()] : null),
tags ?? (includeOptionalProperties ? [_tagDtoFixture.Create()] : null),
language ?? (includeOptionalProperties ? _languageInfoDtoFixture.Create() : null),
@@ -0,0 +1,38 @@
#region ========================================================================= USING =====================================================================================
using Bogus;
using Lumina.Contracts.DTO.MediaLibrary.WrittenContentLibrary.BookLibrary;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
#endregion
namespace Lumina.Contracts.Fixtures.Core.DTO.MediaLibrary.WrittenContentLibrary.BookLibrary;
/// <summary>
/// Fixture class for the <see cref="BookSeriesDto"/> record.
/// </summary>
[ExcludeFromCodeCoverage]
public class BookSeriesDtoFixture
{
private readonly Faker _faker = new();
/// <summary>
/// Creates a new <see cref="BookSeriesDto"/> with randomized test data.
/// </summary>
/// <param name="title">Optional. The title of the book series.</param>
/// <returns>A configured <see cref="BookSeriesDto"/> instance.</returns>
public BookSeriesDto Create(string? title = null)
{
return new BookSeriesDto(title ?? _faker.Lorem.Sentence(3));
}
/// <summary>
/// Creates multiple <see cref="BookSeriesDto"/> instances with randomized test data.
/// </summary>
/// <param name="count">Number of instances to create.</param>
/// <returns>List of configured <see cref="BookSeriesDto"/> instances.</returns>
public List<BookSeriesDto> CreateMany(int count = 3)
{
return [.. Enumerable.Range(0, count).Select(_ => Create())];
}
}
@@ -1,8 +1,9 @@
#region ========================================================================= USING =====================================================================================
#region ========================================================================= USING =====================================================================================
using Bogus;
using Lumina.Contracts.DTO.Common;
using Lumina.Contracts.DTO.MediaLibrary.WrittenContentLibrary;
using Lumina.Contracts.Fixtures.Core.DTO.Common;
using Lumina.Domain.SharedKernel.Common.Enums.Common;
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
@@ -22,6 +23,7 @@ public class WrittenContentMetadataDtoFixture
private readonly GenreDtoFixture _genreDtoFixture = new();
private readonly TagDtoFixture _tagDtoFixture = new();
private readonly LanguageInfoDtoFixture _languageInfoDtoFixture = new();
private readonly ReleaseInfoDtoFixture _releaseInfoDtoFixture = new();
/// <summary>
/// Creates a random valid <see cref="WrittenContentMetadataDto"/>.
@@ -100,13 +102,13 @@ public class WrittenContentMetadataDtoFixture
{
int originalReleaseYear = _random.Next(1900, 2026);
int reReleaseYear = _random.Next(originalReleaseYear, 2026);
return new ReleaseInfoDto(
new DateOnly(originalReleaseYear, 1, 1),
originalReleaseYear,
new DateOnly(reReleaseYear, 1, 1),
reReleaseYear,
_faker.Address.CountryCode(),
_faker.Random.String2(_faker.Random.Number(1, 50)));
return _releaseInfoDtoFixture.Create(
originalReleaseDate: new DateOnly(originalReleaseYear, 1, 1),
originalReleaseYear: originalReleaseYear,
reReleaseDate: new DateOnly(reReleaseYear, 1, 1),
reReleaseYear: reReleaseYear,
releaseCountry: _faker.PickRandom<ReleaseCountry>(),
releaseVersion: _faker.Random.String2(_faker.Random.Number(1, 50)));
}
/// <summary>