MobileInternetTechnolody/Chiara/Chiara.Tests/Utils/MockCreator.cs

21 lines
393 B
C#
Raw Permalink Normal View History

2024-07-04 15:27:19 +08:00
using Chiara.Services;
using Microsoft.Extensions.Logging;
namespace Chiara.Tests.Utils;
public static class MockCreator
{
public static ILogger<T> CreateNoOutputLogger<T>()
{
Mock<ILogger<T>> mock = new();
return mock.Object;
}
public static T CreateEmptyMock<T>() where T : class
{
Mock<T> mock = new();
return mock.Object;
}
}