Adds Book repository unit tests

This commit is contained in:
BinaryAlley committed 2024-09-01 22:40:50 +03:00
1 parent a3e956a165
commit 1ee12d74a4
11 files changed
+649 -12

No files matched your search

@@ -0,0 +1,28 @@
#region ========================================================================= USING =====================================================================================
using AutoFixture.Kernel;
using System.Diagnostics.CodeAnalysis;
#endregion
namespace Lumina.DataAccess.UnitTests.Common.Setup;
/// <summary>
/// Represents a specimen builder for the <see cref="DateOnly"/> type.
/// </summary>
[ExcludeFromCodeCoverage]
public class DateOnlySpecimenBuilder : ISpecimenBuilder
{
#region ===================================================================== METHODS ===================================================================================
/// <summary>
/// Adds <see cref="DateOnly"/> support to the AutoFixture library.
/// </summary>
/// <param name="request">The request to process.</param>
/// <param name="context">The context within which the specimen is created.</param>
/// <returns>A specimen based on the request.</returns>
public object Create(object request, ISpecimenContext context)
{
if (request is Type type && type == typeof(DateOnly))
return DateOnly.FromDateTime(DateTime.Now);
return new NoSpecimen();
}
#endregion
}