public void Add_AddingLoggerToCollection_ReturnsCorrectSize() { const int expectedSize = 1; var collection = new LoggerCollection(); var logger = new ConsoleLogger(); collection.Add(logger); Assert.That(collection.Size(), Is.EqualTo(expectedSize)); }
public static ILogger Create(Options options) { ILogger logger; if (options.LogError) { var collection = new LoggerCollection(); collection.Add(new ConsoleLogger()); collection.Add(new FileLogger(new FileHelper())); logger = collection; } else { logger = new ConsoleLogger(); } return logger; }