public void Should_ReadConfig() { ILoggerReport logger = LoggerReport.ReceiveData(_configPath); var result = logger.GetLineResults(); Assert.IsNotNull(result); }
public static void Main(string[] args) { IReader reader = new ConsoleReader(); ILayoutFactory layoutFactory = new LayoutFactory(); IAppenderFactory appenderFactory = new AppenderFactory(); ICommandInterpreter commandInterpreter = new CommandInterpreter(); ILoggerReport loggerReport = new LoggerReport(); var engine = new Engine(reader, layoutFactory, appenderFactory, commandInterpreter, loggerReport); engine.Run(); }
static void Main(string[] args) { try { var path = Apresentation(); var dataReceived = LoggerReport.ReceiveData(path); var lineResults = dataReceived.GetLineResults(); var template = GetTemplate(); ILapRepository lapRepository = new LapRepository(new FunRaceContext(lineResults)); var addLapCommandHandler = FormulaOneCommand.Initializer(template, lapRepository); addLapCommandHandler.Handler(); var lapQuery = LapQuery.Create(lapRepository); lapQuery.GetPositions(); lapQuery.GetBestLap(); lapQuery.GetAverageSpeed(); lapQuery.GetDifferenceForEachDriver(); lapQuery.GetBestLapOfEachDriver(); } catch (Exception e) { Console.WriteLine(e.Message); Console.WriteLine(e.StackTrace); throw; } }