1 write to _logger
Microsoft.Build.Engine.UnitTests (1)
BackEnd\BuildManager_Tests.cs (1)
77_logger = new MockLogger(output);
140 references to _logger
Microsoft.Build.Engine.UnitTests (140)
BackEnd\BuildManager_Tests.cs (140)
81Loggers = new ILogger[] { _logger }, 137_logger.AssertLogContains("[success]"); 138Assert.Single(_logger.ProjectStartedEvents); 140ProjectEvaluationFinishedEventArgs evalFinishedEvent = _logger.EvaluationFinishedEvents[0]; 209_logger.AllBuildEvents.OfType<ProjectStartedEventArgs>() 212_logger.AllBuildEvents.OfType<ProjectEvaluationFinishedEventArgs>() 216_logger.AllBuildEvents.OfType<ProjectEvaluationStartedEventArgs>() 219_logger.AllBuildEvents.OfType<ProjectEvaluationFinishedEventArgs>() 254_logger.AssertLogContains("[success]"); 255_logger.ProjectStartedEvents.Count.ShouldBe(1); 257ProjectEvaluationFinishedEventArgs evalFinishedEvent = _logger.EvaluationFinishedEvents[0]; 445var customparameters = new BuildParameters { EnableNodeReuse = false, Loggers = new ILogger[] { _logger } }; 511Loggers = new ILogger[] { _logger }, 571_logger.AssertLogContains("[success]"); 572Assert.Single(_logger.ProjectStartedEvents); 574ProjectEvaluationFinishedEventArgs evalFinishedEvent = _logger.EvaluationFinishedEvents[0]; 611_logger.AssertLogContains("[success]"); 612Assert.Single(_logger.ProjectStartedEvents); 614ProjectEvaluationFinishedEventArgs evalFinishedEvent = _logger.EvaluationFinishedEvents[0]; 655_logger.AssertLogContains("[success]"); 656Assert.Single(_logger.ProjectStartedEvents); 658ProjectEvaluationFinishedEventArgs evalFinishedEvent = _logger.EvaluationFinishedEvents[0]; 711Loggers = new ILogger[] { _logger }, 717_logger.AssertLogContains("[success]"); 718Assert.Single(_logger.ProjectStartedEvents); 720ProjectStartedEventArgs projectStartedEvent = _logger.ProjectStartedEvents[0]; 781Loggers = new ILogger[] { _logger }, 787_logger.AssertLogContains("[success]"); 788Assert.Equal(3, _logger.ProjectStartedEvents.Count); 790ProjectStartedEventArgs projectStartedEvent = _logger.ProjectStartedEvents[1]; 805projectStartedEvent = _logger.ProjectStartedEvents[2]; 839_logger.AssertLogContains("[success]"); 840Assert.Single(_logger.ProjectStartedEvents); 842ProjectStartedEventArgs projectStartedEvent = _logger.ProjectStartedEvents[0]; 904var customParameters = new BuildParameters(projectCollection) { Loggers = new ILogger[] { _logger } }; 936_logger.AssertLogContains("[success]"); 937Assert.Single(_logger.ProjectStartedEvents); 939ProjectStartedEventArgs projectStartedEvent = _logger.ProjectStartedEvents[0]; 960_logger.AssertLogContains("[errormessage]"); 1046_logger.AssertLogContains("[errormessage]"); 1047_logger.AssertLogContains("[warn]"); 1048_logger.AssertLogDoesntContain("[message]"); 1049Assert.Single(_logger.BuildStartedEvents); 1050Assert.Single(_logger.BuildFinishedEvents); 1051Assert.Single(_logger.ProjectStartedEvents); 1052Assert.Single(_logger.ProjectFinishedEvents); 1053Assert.Empty(_logger.TargetStartedEvents); 1054Assert.Empty(_logger.TargetFinishedEvents); 1055Assert.Empty(_logger.TaskStartedEvents); 1056Assert.Empty(_logger.TaskFinishedEvents); 1080_logger.AssertLogContains("[errormessage]"); 1081_logger.AssertLogContains("[warn]"); 1082_logger.AssertLogContains("[message]"); 1083Assert.Single(_logger.BuildStartedEvents); 1084Assert.Single(_logger.BuildFinishedEvents); 1085Assert.Single(_logger.ProjectStartedEvents); 1086Assert.Single(_logger.ProjectFinishedEvents); 1087Assert.Single(_logger.TargetStartedEvents); 1088Assert.Single(_logger.TargetFinishedEvents); 1089Assert.Equal(3, _logger.TaskStartedEvents.Count); 1090Assert.Equal(3, _logger.TaskFinishedEvents.Count); 1196Assert.Equal(0, _logger.ErrorCount); 1197Assert.Equal(0, _logger.WarningCount); 1281_logger.AssertLogContains("[success 1]"); 1347_logger.AssertLogContains("[success 1]"); 1348_logger.AssertLogContains("[success 2]"); 1387_logger.AssertLogContains("[success 1]"); 1388_logger.AssertLogContains("[success 2]"); 1537Loggers = new ILogger[] { _logger, new MockLogger(printEventsToStdout: true) }, 1565_logger.AssertLogDoesntContain("[errormessage]"); 1600_logger.AssertLogDoesntContain("[errormessage]"); 1640_logger.AssertLogDoesntContain("[errormessage]"); 1643_logger.AssertLogDoesntContain("MSB4217"); 1646_logger.AssertLogDoesntContain("MSB4216"); 1678_logger.AssertLogDoesntContain("[errormessage]"); 1719_logger.AssertLogDoesntContain("[errormessage]"); 1753_logger.AssertLogDoesntContain("[errormessage]"); 1756_logger.AssertLogDoesntContain("MSB4217"); 1988_logger.ClearLog(); 1996Assert.Contains(skippedMessage, _logger.FullLog); 2038_logger.ClearLog(); 2054_logger.AssertLogContains("Value:Baz"); 2055_logger.ClearLog(); 2070_logger.AssertLogContains("Value:FOO"); 2201_logger.AssertLogContains("[success]"); 2230_logger.AssertLogContains("[success]"); 2231_logger.AssertLogDoesntContain("MSB4223"); 2286_logger.AssertLogDoesntContain("[deleteme]"); 2287_logger.AssertLogContains("[overridden]"); 2288_logger.AssertLogContains("[unmodified]"); 2289_logger.AssertLogContains("[new]"); 2290_logger.AssertLogDoesntContain("[foo]"); 2291_logger.AssertLogContains("[foo2;foo21]"); 2292_logger.AssertLogContains("[baz]"); 2326_logger.AssertLogContains("[overridden]"); 2327_logger.AssertLogContains("[unmodified]"); 2328_logger.AssertLogDoesntContain("[changed]"); 2416_logger.AssertNoWarnings(); 2477_logger.AssertNoWarnings(); 2478_logger.AssertLogContains("[Build]"); 2479_logger.AssertLogContains("[Build2]"); 2480_logger.AssertLogContains("[AT1]"); 2481_logger.AssertLogContains("[AT2]"); 2535_logger.AssertNoWarnings(); 2583Assert.Equal(1, _logger.ErrorCount); 2745_logger.AssertLogDoesntContain("Error 2"); 2750_logger.AssertLogContains(skippedMessage); 2842_logger.AssertLogDoesntContain("Error 2"); 2846_logger.AssertLogContains("Error in Target2"); 2847_logger.AssertLogContains("Target 3"); 2848_logger.AssertLogContains("Target 4"); 2853_logger.AssertLogContains(skippedMessage1); 2858_logger.AssertLogDoesntContain(skippedMessage2); 2862_logger.AssertLogDoesntContain(skippedMessage3); 2866_logger.AssertLogDoesntContain(skippedMessage4); 2942_logger.AssertLogContains("Error 1"); 2943_logger.AssertLogContains("Error 2"); 2948_logger.AssertLogContains(skippedMessage1); 2952_logger.AssertLogContains(skippedMessage2); 3029_logger.AssertLogDoesntContain("Error 2"); 3098_logger.AssertLogDoesntContain("[Error2]"); 3377_logger.AssertLogContains("[BaseValue]"); 3378_logger.AssertLogContains("[BaseItem]"); 3379_logger.ClearLog(); 3385_logger.AssertLogContains("[NewValue]"); 3386_logger.AssertLogContains("[BaseItem;NewItem]"); 3387_logger.AssertLogDoesntContain("[BaseValue]"); 3414Assert.Equal(0, _logger.WarningCount); 3415Assert.Equal(2, _logger.ErrorCount); 3444Assert.Equal(2, _logger.WarningCount); 3445Assert.Equal(1, _logger.ErrorCount); 3475Assert.Equal(0, _logger.WarningCount); 3476Assert.Equal(1, _logger.ErrorCount); 3783Loggers = new ILogger[] { _logger } 3869Loggers = new ILogger[] { _logger } 3908Assert.Contains("The target \"Foo\" does not exist in the project", _logger.FullLog, 3938Loggers = new ILogger[] { _logger } 3967Assert.True(_logger.AllBuildEvents.OfType<ProjectEvaluationStartedEventArgs>().GroupBy(args => args.BuildEventContext.EvaluationId).All(g => g.Count() == 1)); 4429_logger.AssertLogContains("MSB4040"); 4441_logger.AssertLogContains("MSB4040");