1 write to _logger
Microsoft.Build.Engine.UnitTests (1)
BackEnd\SdkResolverService_Tests.cs (1)
35
_logger
= new MockLogger();
30 references to _logger
Microsoft.Build.Engine.UnitTests (30)
BackEnd\SdkResolverService_Tests.cs (30)
37
loggingService.RegisterLogger(
_logger
);
66
_logger
.BuildMessageEvents.Select(i => i.Message).ShouldContain("MockSdkResolver1 running");
67
_logger
.BuildMessageEvents.Select(i => i.Message).ShouldContain("MockSdkResolver2 running");
68
_logger
.BuildMessageEvents.Select(i => i.Message).ShouldNotContain("MockSdkResolverWithResolvableSdkPattern1 running");
69
_logger
.BuildMessageEvents.Select(i => i.Message).ShouldContain("MockSdkResolverWithResolvableSdkPattern2 running");
72
_logger
.Errors[0].Message.ShouldBe(ResourceUtilities.FormatResourceStringIgnoreCodeAndKeyword("FailedToResolveSDK", "notfound", string.Join($"{Environment.NewLine} ", new[] {
79
_logger
.Warnings.Select(i => i.Message).ShouldBe(new[] { "WARNING4", "WARNING2" });
103
_logger
.WarningCount.ShouldBe(1);
104
_logger
.Warnings.First().Code.ShouldStartWith("MSB4241");
132
_logger
.BuildMessageEvents.Select(i => i.Message).ShouldContain("MockSdkResolverWithResolvableSdkPattern2 running");
133
_logger
.BuildMessageEvents.Select(i => i.Message).ShouldNotContain("MockSdkResolver1 running");
134
_logger
.BuildMessageEvents.Select(i => i.Message).ShouldNotContain("MockSdkResolver2 running");
149
_logger
.BuildMessageEvents.Select(i => i.Message).ShouldContain("MockSdkResolver1 running");
150
_logger
.BuildMessageEvents.Select(i => i.Message).ShouldNotContain("MockSdkResolverWithResolvableSdkPattern1 running");
165
_logger
.BuildMessageEvents.Select(i => i.Message).ShouldContain("MockSdkResolverWithResolvableSdkPattern1 running");
166
_logger
.BuildMessageEvents.Select(i => i.Message).ShouldNotContain("MockSdkResolver1 running");
178
_logger
.BuildMessageEvents.Select(i => i.Message).ShouldContain(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("SDKResolverAttempt", nameof(MockResolverReturnsNull), sdk.ToString(), "null",
181
_logger
.BuildMessageEvents.Select(i => i.Message).ShouldContain(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("SucceededToResolveSDK", sdk.ToString(), nameof(MockSdkResolver1), result.Path, result.Version));
212
_logger
.BuildMessageEvents.Select(i => i.Message).ShouldContain("MockSdkResolver1 running");
213
_logger
.BuildMessageEvents.Select(i => i.Message).ShouldContain("MockSdkResolver2 running");
216
_logger
.Warnings.Select(i => i.Message).ShouldBe(new[] { "WARNING2" });
217
_logger
.ErrorCount.ShouldBe(0);
316
_logger
.WarningCount.ShouldBe(0);
322
_logger
.WarningCount.ShouldBe(1);
323
_logger
.Warnings.First().Code.ShouldBe("MSB4240");
403
_logger
.WarningCount.ShouldBe(0);
439
_logger
.WarningCount.ShouldBe(0);
491
_logger
.WarningCount.ShouldBe(0);
536
_logger
.WarningCount.ShouldBe(1);
537
_logger
.Warnings.First().Code.ShouldStartWith("MSB4241");