1 write to ErrorCount
Microsoft.Build.UnitTests.Shared (1)
MockLogger.cs (1)
300++ErrorCount;
88 references to ErrorCount
Microsoft.Build.Engine.OM.UnitTests (1)
Definition\Project_Tests.cs (1)
2078logger.ErrorCount.ShouldBe(1);
Microsoft.Build.Engine.UnitTests (70)
BackEnd\BuildManager_Tests.cs (5)
1195Assert.Equal(0, _logger.ErrorCount); 2582Assert.Equal(1, _logger.ErrorCount); 3414Assert.Equal(2, _logger.ErrorCount); 3444Assert.Equal(1, _logger.ErrorCount); 3475Assert.Equal(1, _logger.ErrorCount);
BackEnd\GenerateTemporaryTargetAssembly_Tests.cs (1)
34logger.ErrorCount.ShouldBe(1);
BackEnd\MSBuild_Tests.cs (7)
234Assert.Equal(1, logger.ErrorCount); 270Assert.Equal(0, logger.ErrorCount); 308Assert.Equal(0, logger.ErrorCount); 357Assert.Equal(1, logger.ErrorCount); 401Assert.Equal(1, logger.ErrorCount); 844Assert.Equal(0, logger.ErrorCount); 883Assert.Equal(0, logger.ErrorCount);
BackEnd\OnError_Tests.cs (22)
50Assert.Equal(1, l.ErrorCount); // "Expected one error because 'Build' failed." 178Assert.Equal(1, l.ErrorCount); // "Expected one error because 'Build' failed." 209Assert.Equal(1, l.ErrorCount); // "Expected one error because 'Build' failed." 242Assert.Equal(1, l.ErrorCount); // "Expected one error because 'Build' failed." 275Assert.Equal(1, l.ErrorCount); // "Expected one error because 'Build' failed." 307Assert.Equal(1, l.ErrorCount); // "Expected one error because 'BuildStep1' failed." 334Assert.Equal(2, l.ErrorCount); // "Expected at least one error because 'Build' failed and one error because 'CleanUp' didn't exist." 362Assert.Equal(1, l.ErrorCount); // "Expected one error because 'Build' failed." 390Assert.Equal(1, l.ErrorCount); // "Expected one error because 'Build' failed." 422Assert.Equal(1, l.ErrorCount); // "Expected one error because 'Build' failed." 463Assert.Equal(4, l.ErrorCount); // "Four build errors expect: One from CoreBuild and on each from the error handlers." 490Assert.Equal(2, l.ErrorCount); // "Expected one error because 'Build' failed and one because 'CleanUp' doesn't exist." 520Assert.Equal(1, l.ErrorCount); // "Expected one error because 'Build' failed." 545Assert.Equal(2, l.ErrorCount); // "Expected one error because 'Build' failed and one error because of the circular dependency." 590logger.ErrorCount.ShouldBe(1); 595logger.ErrorCount.ShouldBe(0); 616Assert.Equal(0, l.ErrorCount); // "Expected no error because 'Build' succeeded." 638Assert.Equal(1, l.ErrorCount); // "Expected one error because 'Build' failed." 661Assert.Equal(1, l.ErrorCount); // "Expected one error because 'Build' failed." 684Assert.Equal(1, l.ErrorCount); // "Expected one error because 'Build' failed." 707Assert.Equal(1, l.ErrorCount); // "Expected one error because 'Build' failed." 730Assert.Equal(1, l.ErrorCount); // "Expected one error because 'Build' failed."
BackEnd\SdkResolverLoader_Tests.cs (4)
51_logger.ErrorCount.ShouldBe(0); 149_logger.ErrorCount.ShouldBe(0); 179_logger.ErrorCount.ShouldBe(0); 212_logger.ErrorCount.ShouldBe(0);
BackEnd\SdkResolverService_Tests.cs (1)
267_logger.ErrorCount.ShouldBe(0);
BackEnd\TargetBuilder_Tests.cs (1)
1376_mockLogger.ErrorCount.ShouldBe(1);
BackEnd\TaskBuilder_Tests.cs (1)
192logger.ErrorCount.ShouldBe(0);
BackEnd\TaskRegistry_Tests.cs (1)
682logger.ErrorCount.ShouldBe(1);
Evaluation\Evaluator_Tests.cs (1)
2353Assert.Equal(1, mockLogger.ErrorCount);
Evaluation\SdkResultEvaluation_Tests.cs (6)
137_logger.ErrorCount.ShouldBe(0); 267_logger.ErrorCount.ShouldBe(0); 367if (_logger.ErrorCount > 0 || _logger.WarningCount > 0) 372_logger.ErrorCount.ShouldBe(0); 441_logger.ErrorCount.ShouldBe(0); 495_logger.ErrorCount.ShouldBe(0);
Graph\IsolateProjects_Tests.cs (9)
207logger.ErrorCount.ShouldBe(1); 232logger.ErrorCount.ShouldBe(0); 254logger.ErrorCount.ShouldBe(0); 350rootLogger.ErrorCount.ShouldBe(0); 351declaredReferenceLogger.ErrorCount.ShouldBe(0); 381logger.ErrorCount.ShouldBe(0); 420logger.ErrorCount.ShouldBe(1); 437logger.ErrorCount.ShouldBe(1); 610buildManagerSession.Logger.ErrorCount.ShouldBe(0);
Graph\ProjectGraph_Tests.cs (1)
1617project1MockLogger.ErrorCount.ShouldBe(1);
Graph\ResultCacheBasedBuilds_Tests.cs (6)
73_logger.ErrorCount.ShouldBe(1); 95_logger.ErrorCount.ShouldBe(0); 116_logger.ErrorCount.ShouldBe(1); 173_logger.ErrorCount.ShouldBe(0); 396results["1"].Logger.ErrorCount.ShouldBe(1); 572_logger.ErrorCount.ShouldBe(1);
WarningsAsMessagesAndErrors_Tests.cs (4)
307logger.ErrorCount.ShouldBe(1); 359logger.ErrorCount.ShouldBe(1); 395logger.ErrorCount.ShouldBe(errorCountShouldBe); 555logger.ErrorCount.ShouldBe(0);
Microsoft.Build.Tasks.UnitTests (9)
CallTarget_Tests.cs (1)
125logger.ErrorCount.ShouldBe(1);
MSBuild_Tests.cs (7)
215Assert.Equal(1, logger.ErrorCount); 249Assert.Equal(0, logger.ErrorCount); 285Assert.Equal(0, logger.ErrorCount); 333Assert.Equal(1, logger.ErrorCount); 376Assert.Equal(1, logger.ErrorCount); 1421logger.ErrorCount.ShouldBe(0); 1445logger.ErrorCount.ShouldBe(1);
SGen_Tests.cs (1)
43logger.ErrorCount.ShouldBe(1);
Microsoft.Build.UnitTests.Shared (3)
MockLogger.cs (1)
549public void AssertNoErrors() => Assert.Equal(0, ErrorCount);
ObjectModelHelpers.cs (2)
1517mockLogger.ErrorCount.ShouldBe(1); 1534mockLogger.ErrorCount.ShouldBe(0);
Microsoft.Build.Utilities.UnitTests (5)
MuxLogger_Tests.cs (5)
170mockLogger.ErrorCount.ShouldBe(1); 230mockLogger1.ErrorCount.ShouldBe(1); 237mockLogger2.ErrorCount.ShouldBe(0); 280Assert.Equal(1, mockLogger1.ErrorCount); 285mockLogger2.ErrorCount.ShouldBe(1);