1 write to ErrorCount
Microsoft.Build.UnitTests.Shared (1)
MockLogger.cs (1)
300++ErrorCount;
87 references to ErrorCount
Microsoft.Build.Engine.OM.UnitTests (1)
Definition\Project_Tests.cs (1)
2078logger.ErrorCount.ShouldBe(1);
Microsoft.Build.Engine.UnitTests (69)
BackEnd\BuildManager_Tests.cs (5)
1196Assert.Equal(0, _logger.ErrorCount); 2583Assert.Equal(1, _logger.ErrorCount); 3415Assert.Equal(2, _logger.ErrorCount); 3445Assert.Equal(1, _logger.ErrorCount); 3476Assert.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)
217_logger.ErrorCount.ShouldBe(0);
BackEnd\TargetBuilder_Tests.cs (1)
1377_mockLogger.ErrorCount.ShouldBe(1);
BackEnd\TaskBuilder_Tests.cs (1)
193logger.ErrorCount.ShouldBe(0);
BackEnd\TaskRegistry_Tests.cs (1)
682logger.ErrorCount.ShouldBe(1);
Evaluation\Evaluator_Tests.cs (1)
2318Assert.Equal(1, mockLogger.ErrorCount);
Evaluation\SdkResultEvaluation_Tests.cs (6)
136_logger.ErrorCount.ShouldBe(0); 232_logger.ErrorCount.ShouldBe(0); 332if (_logger.ErrorCount > 0 || _logger.WarningCount > 0) 337_logger.ErrorCount.ShouldBe(0); 406_logger.ErrorCount.ShouldBe(0); 460_logger.ErrorCount.ShouldBe(0);
Graph\IsolateProjects_Tests.cs (9)
208logger.ErrorCount.ShouldBe(1); 233logger.ErrorCount.ShouldBe(0); 255logger.ErrorCount.ShouldBe(0); 351rootLogger.ErrorCount.ShouldBe(0); 352declaredReferenceLogger.ErrorCount.ShouldBe(0); 382logger.ErrorCount.ShouldBe(0); 421logger.ErrorCount.ShouldBe(1); 438logger.ErrorCount.ShouldBe(1); 611buildManagerSession.Logger.ErrorCount.ShouldBe(0);
Graph\ProjectGraph_Tests.cs (1)
1617project1MockLogger.ErrorCount.ShouldBe(1);
Graph\ResultCacheBasedBuilds_Tests.cs (6)
74_logger.ErrorCount.ShouldBe(1); 96_logger.ErrorCount.ShouldBe(0); 117_logger.ErrorCount.ShouldBe(1); 174_logger.ErrorCount.ShouldBe(0); 397results["1"].Logger.ErrorCount.ShouldBe(1); 573_logger.ErrorCount.ShouldBe(1);
WarningsAsMessagesAndErrors_Tests.cs (3)
307logger.ErrorCount.ShouldBe(1); 359logger.ErrorCount.ShouldBe(1); 395logger.ErrorCount.ShouldBe(errorCountShouldBe);
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)
44logger.ErrorCount.ShouldBe(1);
Microsoft.Build.UnitTests.Shared (3)
MockLogger.cs (1)
549public void AssertNoErrors() => Assert.Equal(0, ErrorCount);
ObjectModelHelpers.cs (2)
1516mockLogger.ErrorCount.ShouldBe(1); 1533mockLogger.ErrorCount.ShouldBe(0);
Microsoft.Build.Utilities.UnitTests (5)
MuxLogger_Tests.cs (5)
172mockLogger.ErrorCount.ShouldBe(1); 232mockLogger1.ErrorCount.ShouldBe(1); 239mockLogger2.ErrorCount.ShouldBe(0); 282Assert.Equal(1, mockLogger1.ErrorCount); 287mockLogger2.ErrorCount.ShouldBe(1);