1 write to _customLogger
Microsoft.Build.Engine.UnitTests (1)
BackEnd\TaskHost_Tests.cs (1)
68_customLogger = new MyCustomLogger();
53 references to _customLogger
Microsoft.Build.Engine.UnitTests (53)
BackEnd\TaskHost_Tests.cs (53)
72_loggingService.RegisterLogger(_customLogger); 133Assert.True(_customLogger.LastError is MyCustomBuildErrorEventArgs); // "Expected Custom Error Event" 136customBuildError = _customLogger.LastError as MyCustomBuildErrorEventArgs; 158Assert.True(_customLogger.LastWarning is MyCustomBuildWarningEventArgs); // "Expected Custom Warning Event" 161customBuildWarning = _customLogger.LastWarning as MyCustomBuildWarningEventArgs; 183Assert.True(_customLogger.LastMessage is MyCustomMessageEvent); // "Expected Custom message Event" 185customMessage = _customLogger.LastMessage as MyCustomMessageEvent; 201Assert.True(_customLogger.LastError is BuildErrorEventArgs); // "Expected Error Event" 202Assert.Equal(0, _customLogger.LastError.LineNumber); // "Expected line number to be 0" 207Assert.Null(_customLogger.LastWarning); // "Expected no Warning Event at this point" 213Assert.True(_customLogger.LastWarning is BuildWarningEventArgs); // "Expected Warning Event" 214Assert.Equal(0, _customLogger.LastWarning.LineNumber); // "Expected line number to be 0" 219Assert.Equal(1, _customLogger.NumberOfWarning); // "Expected one Warning Event at this point" 220Assert.Equal(1, _customLogger.NumberOfError); // "Expected one Warning Event at this point" 226Assert.True(_customLogger.LastError is BuildErrorEventArgs); // "Expected Error Event" 227Assert.Equal(0, _customLogger.LastWarning.LineNumber); // "Expected line number to be 0" 284Assert.True(_customLogger.LastError is BuildErrorEventArgs); // "Expected Error Event" 285Assert.Equal(0, _customLogger.LastError.LineNumber); // "Expected line number to be 0" 298Assert.True(_customLogger.LastWarning is BuildWarningEventArgs); // "Expected Warning Event" 299Assert.Equal(0, _customLogger.LastWarning.LineNumber); // "Expected line number to be 0" 312Assert.True(_customLogger.LastMessage is BuildMessageEventArgs); // "Expected Message Event" 313Assert.Equal(MessageImportance.High, _customLogger.LastMessage.Importance); // "Expected Message importance to be high" 326Assert.True(_customLogger.LastCustom is CustomBuildEventArgs); // "Expected custom build Event" 327Assert.Equal("testCustomBuildEvent", _customLogger.LastCustom.Message); 342Assert.True(_customLogger.LastError is BuildErrorEventArgs); // "Expected Error Event" 343Assert.Contains("SubCategory", _customLogger.LastError.Message); // "Expected line number to be 0" 356Assert.True(_customLogger.LastWarning is MyCustomBuildWarningEventArgsNotSerializable); // "Expected Warning Event" 357Assert.Contains("SubCategory", _customLogger.LastWarning.Message); // "Expected line number to be 0" 370Assert.True(_customLogger.LastMessage is MyCustomMessageEventNotSerializable); // "Expected Message Event" 371Assert.Contains("message", _customLogger.LastMessage.Message); // "Expected Message importance to be high" 384Assert.True(_customLogger.LastCustom is MyCustomBuildEventArgsNotSerializable); // "Expected custom build Event" 385Assert.Equal("testCustomBuildEvent", _customLogger.LastCustom.Message); 400Assert.True(_customLogger.LastCustom is ExtendedCustomBuildEventArgs); // "Expected custom build Event" 401Assert.Equal("ext message", _customLogger.LastCustom.Message); 413Assert.True(_customLogger.LastError is ExtendedBuildErrorEventArgs); // "Expected custom build Event" 414Assert.Equal("ext err message", _customLogger.LastError.Message); 426Assert.True(_customLogger.LastWarning is ExtendedBuildWarningEventArgs); // "Expected custom build Event" 427Assert.Equal("ext warn message", _customLogger.LastWarning.Message); 439Assert.True(_customLogger.LastMessage is ExtendedBuildMessageEventArgs); // "Expected custom build Event" 440Assert.Equal("ext message", _customLogger.LastMessage.Message); 457Assert.Null(_customLogger.LastError); // "Expected no error Event" 458Assert.True(_customLogger.LastWarning is BuildWarningEventArgs); // "Expected Warning Event" 461Assert.Contains(message, _customLogger.LastWarning.Message); // "Expected line to contain NotSerializable message but it did not" 476Assert.True(_customLogger.LastWarning is BuildWarningEventArgs); // "Expected Warning Event" 477Assert.Equal(1, _customLogger.NumberOfWarning); // "Expected there to be only one warning" 480Assert.Contains(message, _customLogger.LastWarning.Message); // "Expected line to contain NotSerializable message but it did not" 496Assert.True(_customLogger.LastWarning is BuildWarningEventArgs); // "Expected Warning Event" 497Assert.Equal(1, _customLogger.NumberOfWarning); // "Expected there to be only one warning" 500Assert.Contains(message, _customLogger.LastWarning.Message); // "Expected line to contain NotSerializable message but it did not" 514Assert.Null(_customLogger.LastCustom as MyCustomBuildEventArgsNotSerializable); // "Expected no custom Event" 517Assert.True(_customLogger.LastWarning is BuildWarningEventArgs); // "Expected Warning Event" 518Assert.Equal(1, _customLogger.NumberOfWarning); // "Expected there to be only one warning" 520Assert.Contains(message, _customLogger.LastWarning.Message); // "Expected line to contain NotSerializable message but it did not"