1 write to _logger
Microsoft.Build.Engine.UnitTests (1)
BackEnd\SdkResolverService_Tests.cs (1)
37
_logger
= new MockLogger();
30 references to _logger
Microsoft.Build.Engine.UnitTests (30)
BackEnd\SdkResolverService_Tests.cs (30)
39
loggingService.RegisterLogger(
_logger
);
64
_logger
.BuildMessageEvents.Select(i => i.Message).ShouldContain("MockSdkResolver1 running");
65
_logger
.BuildMessageEvents.Select(i => i.Message).ShouldContain("MockSdkResolver2 running");
66
_logger
.BuildMessageEvents.Select(i => i.Message).ShouldNotContain("MockSdkResolverWithResolvableSdkPattern1 running");
67
_logger
.BuildMessageEvents.Select(i => i.Message).ShouldContain("MockSdkResolverWithResolvableSdkPattern2 running");
70
_logger
.Errors[0].Message.ShouldBe(ResourceUtilities.FormatResourceStringIgnoreCodeAndKeyword("FailedToResolveSDK", "notfound", string.Join($"{Environment.NewLine} ", new[] {
77
_logger
.Warnings.Select(i => i.Message).ShouldBe(new[] { "WARNING4", "WARNING2" });
102
_logger
.WarningCount.ShouldBe(1);
103
_logger
.Warnings.First().Code.ShouldStartWith("MSB4241");
133
_logger
.BuildMessageEvents.Select(i => i.Message).ShouldContain("MockSdkResolverWithResolvableSdkPattern2 running");
134
_logger
.BuildMessageEvents.Select(i => i.Message).ShouldNotContain("MockSdkResolver1 running");
135
_logger
.BuildMessageEvents.Select(i => i.Message).ShouldNotContain("MockSdkResolver2 running");
197
_logger
.BuildMessageEvents.Select(i => i.Message).ShouldContain("MockSdkResolver1 running");
198
_logger
.BuildMessageEvents.Select(i => i.Message).ShouldNotContain("MockSdkResolverWithResolvableSdkPattern1 running");
214
_logger
.BuildMessageEvents.Select(i => i.Message).ShouldContain("MockSdkResolverWithResolvableSdkPattern1 running");
215
_logger
.BuildMessageEvents.Select(i => i.Message).ShouldNotContain("MockSdkResolver1 running");
228
_logger
.BuildMessageEvents.Select(i => i.Message).ShouldContain(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("SDKResolverAttempt", nameof(MockResolverReturnsNull), sdk.ToString(), "null",
231
_logger
.BuildMessageEvents.Select(i => i.Message).ShouldContain(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("SucceededToResolveSDK", sdk.ToString(), nameof(MockSdkResolver1), result.Path, result.Version));
264
_logger
.BuildMessageEvents.Select(i => i.Message).ShouldContain("MockSdkResolver1 running");
265
_logger
.BuildMessageEvents.Select(i => i.Message).ShouldContain("MockSdkResolver2 running");
268
_logger
.Warnings.Select(i => i.Message).ShouldBe(new[] { "WARNING2" });
269
_logger
.ErrorCount.ShouldBe(0);
371
_logger
.WarningCount.ShouldBe(0);
377
_logger
.WarningCount.ShouldBe(1);
378
_logger
.Warnings.First().Code.ShouldBe("MSB4240");
459
_logger
.WarningCount.ShouldBe(0);
496
_logger
.WarningCount.ShouldBe(0);
549
_logger
.WarningCount.ShouldBe(0);
595
_logger
.WarningCount.ShouldBe(1);
596
_logger
.Warnings.First().Code.ShouldStartWith("MSB4241");