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