public void Should_Return_The_Same_Configuration() { // Given var settings = new DotNetCoreMSBuildSettings(); // When var result = settings.AddFileLogger(new MSBuildFileLoggerSettings()); var result1 = settings.AddFileLogger(); // Then Assert.Equal(settings, result); Assert.Equal(settings, result1); }
public void Should_Add_Logger() { // Given var settings = new DotNetCoreMSBuildSettings(); var fileLogger = new MSBuildFileLoggerSettings(); var fileLogger2 = new MSBuildFileLoggerSettings() { LogFile = "A" }; // When settings.AddFileLogger(fileLogger); settings.AddFileLogger(fileLogger2); // Then var loggers = settings.FileLoggers.ToArray(); Assert.Equal(2, loggers.Length); Assert.Equal(fileLogger, loggers[0]); Assert.Equal(fileLogger2, loggers[1]); Assert.Equal("A", loggers[1].LogFile); }