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)
39loggingService.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");