static void Main(string[] args) { string comand = args[0]; switch (comand) { case "convert": string url = args[1]; string path = args[2]; var logFacade = new LogFacade( new LogService(new LogClient( WebRequest.CreateHttp(url) )) , new LogFile(path) ); logFacade.ConvertLog(); break; default: Console.WriteLine("Comand not found"); break; } }
public void CheckValues() { //Arrange MockLogClient logClient = new MockLogClient(); MockLogFile logFile = new MockLogFile(); LogService logService = new LogService(logClient); var logFacade = new LogFacade(logService, logFile); //Act logFacade.ConvertLog(); //Assert Assert.Contains("robots.txt", logFile.content); Assert.Contains("myImages", logFile.content); Assert.Contains("not-found", logFile.content); }