mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 19:21:10 +00:00
Refactors metadata provider contracts to typed interfaces
This commit is contained in:
1 parent
c82fadc7a2
commit
04927a95af
14 files changed
+274
-117
No files matched your search
@@ -0,0 +1,12 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Contracts.DTO.Common;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Fixtures.Core.DTO.Common;
|
||||
|
||||
/// <summary>
|
||||
/// Test double deriving from <see cref="MetadataLookupDto"/> for a runtime type other than <see cref="BookMetadataLookupDto"/>.
|
||||
/// </summary>
|
||||
[ExcludeFromCodeCoverage]
|
||||
public sealed record OtherMetadataLookupDto : MetadataLookupDto;
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Contracts.DTO.Common;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Fixtures.Core.DTO.Common;
|
||||
|
||||
/// <summary>
|
||||
/// Fixture class for the <see cref="OtherMetadataLookupDto"/> record.
|
||||
/// </summary>
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class OtherMetadataLookupDtoFixture
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a <see cref="OtherMetadataLookupDto"/>.
|
||||
/// </summary>
|
||||
/// <returns>The created <see cref="OtherMetadataLookupDto"/>.</returns>
|
||||
public OtherMetadataLookupDto Create()
|
||||
{
|
||||
return new OtherMetadataLookupDto();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a list of <see cref="OtherMetadataLookupDto"/>.
|
||||
/// </summary>
|
||||
/// <param name="count">The number of elements to create.</param>
|
||||
/// <returns>The created list.</returns>
|
||||
public List<OtherMetadataLookupDto> CreateMany(int count = 3)
|
||||
{
|
||||
return [.. Enumerable.Range(0, count).Select(_ => Create())];
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user