using Microsoft.Extensions.Logging; namespace OwnerNumberMigrationTest.TestDoubles; public record Log(LogLevel LogLevel, Exception? Exception, string Message); public class FakeLogger : ILogger { public IList Logs { get; }= new List(); public IDisposable BeginScope(TState state) { throw new NotImplementedException(); } public bool IsEnabled(LogLevel logLevel) { throw new NotImplementedException(); } public void Log(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func formatter) { Logs.Add(new Log(logLevel, exception, formatter(state, exception))); } }