adding
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace OwnerNumberMigrationTest.TestDoubles;
|
||||
|
||||
public record Log(LogLevel LogLevel, Exception? Exception, string Message);
|
||||
|
||||
public class FakeLogger : ILogger
|
||||
{
|
||||
public IList<Log> Logs { get; }= new List<Log>();
|
||||
|
||||
public IDisposable BeginScope<TState>(TState state)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool IsEnabled(LogLevel logLevel)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
|
||||
{
|
||||
Logs.Add(new Log(logLevel, exception, formatter(state, exception)));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user