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)
81
Loggers = new ILogger[] {
_logger
},
137
_logger
.AssertLogContains("[success]");
138
Assert.Single(
_logger
.ProjectStartedEvents);
140
ProjectEvaluationFinishedEventArgs 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);
257
ProjectEvaluationFinishedEventArgs evalFinishedEvent =
_logger
.EvaluationFinishedEvents[0];
445
var customparameters = new BuildParameters { EnableNodeReuse = false, Loggers = new ILogger[] {
_logger
} };
511
Loggers = new ILogger[] {
_logger
},
571
_logger
.AssertLogContains("[success]");
572
Assert.Single(
_logger
.ProjectStartedEvents);
574
ProjectEvaluationFinishedEventArgs evalFinishedEvent =
_logger
.EvaluationFinishedEvents[0];
611
_logger
.AssertLogContains("[success]");
612
Assert.Single(
_logger
.ProjectStartedEvents);
614
ProjectEvaluationFinishedEventArgs evalFinishedEvent =
_logger
.EvaluationFinishedEvents[0];
655
_logger
.AssertLogContains("[success]");
656
Assert.Single(
_logger
.ProjectStartedEvents);
658
ProjectEvaluationFinishedEventArgs evalFinishedEvent =
_logger
.EvaluationFinishedEvents[0];
711
Loggers = new ILogger[] {
_logger
},
717
_logger
.AssertLogContains("[success]");
718
Assert.Single(
_logger
.ProjectStartedEvents);
720
ProjectStartedEventArgs projectStartedEvent =
_logger
.ProjectStartedEvents[0];
781
Loggers = new ILogger[] {
_logger
},
787
_logger
.AssertLogContains("[success]");
788
Assert.Equal(3,
_logger
.ProjectStartedEvents.Count);
790
ProjectStartedEventArgs projectStartedEvent =
_logger
.ProjectStartedEvents[1];
805
projectStartedEvent =
_logger
.ProjectStartedEvents[2];
839
_logger
.AssertLogContains("[success]");
840
Assert.Single(
_logger
.ProjectStartedEvents);
842
ProjectStartedEventArgs projectStartedEvent =
_logger
.ProjectStartedEvents[0];
904
var customParameters = new BuildParameters(projectCollection) { Loggers = new ILogger[] {
_logger
} };
936
_logger
.AssertLogContains("[success]");
937
Assert.Single(
_logger
.ProjectStartedEvents);
939
ProjectStartedEventArgs projectStartedEvent =
_logger
.ProjectStartedEvents[0];
960
_logger
.AssertLogContains("[errormessage]");
1046
_logger
.AssertLogContains("[errormessage]");
1047
_logger
.AssertLogContains("[warn]");
1048
_logger
.AssertLogDoesntContain("[message]");
1049
Assert.Single(
_logger
.BuildStartedEvents);
1050
Assert.Single(
_logger
.BuildFinishedEvents);
1051
Assert.Single(
_logger
.ProjectStartedEvents);
1052
Assert.Single(
_logger
.ProjectFinishedEvents);
1053
Assert.Empty(
_logger
.TargetStartedEvents);
1054
Assert.Empty(
_logger
.TargetFinishedEvents);
1055
Assert.Empty(
_logger
.TaskStartedEvents);
1056
Assert.Empty(
_logger
.TaskFinishedEvents);
1080
_logger
.AssertLogContains("[errormessage]");
1081
_logger
.AssertLogContains("[warn]");
1082
_logger
.AssertLogContains("[message]");
1083
Assert.Single(
_logger
.BuildStartedEvents);
1084
Assert.Single(
_logger
.BuildFinishedEvents);
1085
Assert.Single(
_logger
.ProjectStartedEvents);
1086
Assert.Single(
_logger
.ProjectFinishedEvents);
1087
Assert.Single(
_logger
.TargetStartedEvents);
1088
Assert.Single(
_logger
.TargetFinishedEvents);
1089
Assert.Equal(3,
_logger
.TaskStartedEvents.Count);
1090
Assert.Equal(3,
_logger
.TaskFinishedEvents.Count);
1196
Assert.Equal(0,
_logger
.ErrorCount);
1197
Assert.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]");
1537
Loggers = 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();
1996
Assert.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();
2583
Assert.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]");
3414
Assert.Equal(0,
_logger
.WarningCount);
3415
Assert.Equal(2,
_logger
.ErrorCount);
3444
Assert.Equal(2,
_logger
.WarningCount);
3445
Assert.Equal(1,
_logger
.ErrorCount);
3475
Assert.Equal(0,
_logger
.WarningCount);
3476
Assert.Equal(1,
_logger
.ErrorCount);
3783
Loggers = new ILogger[] {
_logger
}
3869
Loggers = new ILogger[] {
_logger
}
3908
Assert.Contains("The target \"Foo\" does not exist in the project",
_logger
.FullLog,
3938
Loggers = new ILogger[] {
_logger
}
3967
Assert.True(
_logger
.AllBuildEvents.OfType<ProjectEvaluationStartedEventArgs>().GroupBy(args => args.BuildEventContext.EvaluationId).All(g => g.Count() == 1));
4429
_logger
.AssertLogContains("MSB4040");
4441
_logger
.AssertLogContains("MSB4040");