mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 18:21:10 +00:00
Adds the test suites for the library path templates and centralizes their resolution in the domain service
This commit is contained in:
1 parent
ca4f308b0a
commit
7ed6f05632
52 files changed
+4724
-40
No files matched your search
+36
@@ -0,0 +1,36 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Presentation.Web.Common.Requests.Library.Management;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Presentation.Web.Fixtures.Common.Requests.Library.Management;
|
||||
|
||||
/// <summary>
|
||||
/// Fixture class for the <see cref="GetLibraryPathTemplatePartsRequest"/> record.
|
||||
/// </summary>
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class GetLibraryPathTemplatePartsRequestFixture
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a random valid <see cref="GetLibraryPathTemplatePartsRequest"/>.
|
||||
/// </summary>
|
||||
/// <param name="libraryType">Optional. The media library type whose available path parts are retrieved.</param>
|
||||
/// <returns>The created <see cref="GetLibraryPathTemplatePartsRequest"/>.</returns>
|
||||
public GetLibraryPathTemplatePartsRequest Create(
|
||||
string? libraryType = null)
|
||||
{
|
||||
return new GetLibraryPathTemplatePartsRequest(libraryType ?? "Music");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a list of <see cref="GetLibraryPathTemplatePartsRequest"/>.
|
||||
/// </summary>
|
||||
/// <param name="count">The number of elements to create.</param>
|
||||
/// <returns>The created list.</returns>
|
||||
public List<GetLibraryPathTemplatePartsRequest> CreateMany(int count = 3)
|
||||
{
|
||||
return [.. Enumerable.Range(0, count).Select(_ => Create())];
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user