public void Setup() { this.loggerMock = new Mock <ILogger>(); this.fileWrapperMock = new Mock <IFileWrapper>(); this.pathToHostsFile = "/etc/hosts"; this.hostFileParser = new HostFileParser(this.loggerMock.Object); this.hostFileDownloader = new HostFileDownloader(this.loggerMock.Object, new HttpClient(), this.hostFileParser); this.hostFileWriter = new HostFileWriter(this.loggerMock.Object, this.fileWrapperMock.Object, this.hostFileParser, this.pathToHostsFile); }
private static void Setup(string[] args) { log = new LoggerConfiguration() .WriteTo.Console() .CreateLogger(); fileWrapper = new FileWrapper(); appConfiguration = new AppConfiguration(log, fileWrapper, args); ConfigureLogger(); httpClient = new HttpClient(); hostFileParser = new HostFileParser(log); hostFileWriter = new HostFileWriter(log, fileWrapper, hostFileParser, appConfiguration.ConfigurationOptions.HostsFilePath); hostFileDownloader = new HostFileDownloader(log, httpClient, hostFileParser); }
public void Setup() { this.loggerMock = new Mock <ILogger>(); this.hostFileParser = new HostFileParser(this.loggerMock.Object); }