public void LoadReaderLogs(IJsonLogParser parser, IJsonLogStoringService storingService, string fileName) { var logRecord = new ReaderLogRecord { Logger = "test" }; parser.ReadFile <ReaderLogRecord>(fileName).Returns(new List <ReaderLogRecord> { logRecord }); var loader = new AppLogLoader(parser, storingService); loader.LoadReaderLogs(fileName); storingService.Received(1).BeginWork(); storingService.Received(1).RegisterReaderLogItem(logRecord); }
public AppLogLoader(IJsonLogParser jsonLogParser, IJsonLogStoringService jsonLogStoringService) { _jsonLogParser = jsonLogParser; _jsonLogStoringService = jsonLogStoringService; }
public LoggingJsonLogParser(ILogger <LoggingJsonLogParser> log, IJsonLogParser instance) { _log = log; _instance = instance; }