1 write to _initializedService
Microsoft.Build.Engine.UnitTests (1)
BackEnd\LoggingService_Tests.cs (1)
1094
_initializedService
= logServiceComponent as LoggingService;
124 references to _initializedService
Microsoft.Build.Engine.UnitTests (124)
BackEnd\LoggingService_Tests.cs (124)
131
_initializedService
.ShutdownComponent();
132
_initializedService
.InitializeComponent(new MockHost());
146
Assert.Equal(LoggingServiceState.Shutdown,
_initializedService
.ServiceState);
152
Assert.Equal(LoggingServiceState.Shutdown,
_initializedService
.ServiceState);
160
Assert.Equal(LoggingServiceState.Shutdown,
_initializedService
.ServiceState);
179
Assert.Equal(LoggingServiceState.Shutdown,
_initializedService
.ServiceState);
191
_initializedService
.ShutdownComponent();
192
_initializedService
.ShutdownComponent();
206
_initializedService
.RegisterLogger(null);
218
_initializedService
.ShutdownComponent();
220
_initializedService
.RegisterLogger(regularILogger);
233
_initializedService
.RegisterLogger(exceptionLogger);
246
_initializedService
.RegisterLogger(exceptionLogger);
259
_initializedService
.RegisterLogger(exceptionLogger);
271
Assert.True(
_initializedService
.RegisterLogger(consoleLogger));
272
Assert.True(
_initializedService
.RegisterLogger(regularILogger));
273
Assert.NotNull(
_initializedService
.RegisteredLoggerTypeNames);
276
Assert.Equal(3,
_initializedService
.RegisteredLoggerTypeNames.Count);
277
Assert.Contains("Microsoft.Build.BackEnd.Logging.CentralForwardingLogger",
_initializedService
.RegisteredLoggerTypeNames);
278
Assert.Contains("Microsoft.Build.UnitTests.Logging.LoggingService_Tests+RegularILogger",
_initializedService
.RegisteredLoggerTypeNames);
279
Assert.Contains("Microsoft.Build.Logging.ConsoleLogger",
_initializedService
.RegisteredLoggerTypeNames);
282
Assert.NotNull(
_initializedService
.RegisteredSinkNames);
283
Assert.Single(
_initializedService
.RegisteredSinkNames);
294
Assert.True(
_initializedService
.RegisterLogger(consoleLogger));
295
Assert.False(
_initializedService
.RegisterLogger(consoleLogger));
296
Assert.True(
_initializedService
.RegisterLogger(regularILogger));
297
Assert.False(
_initializedService
.RegisterLogger(regularILogger));
298
Assert.NotNull(
_initializedService
.RegisteredLoggerTypeNames);
300
Assert.Equal(3,
_initializedService
.RegisteredLoggerTypeNames.Count);
301
Assert.Contains("Microsoft.Build.BackEnd.Logging.CentralForwardingLogger",
_initializedService
.RegisteredLoggerTypeNames);
302
Assert.Contains("Microsoft.Build.UnitTests.Logging.LoggingService_Tests+RegularILogger",
_initializedService
.RegisteredLoggerTypeNames);
303
Assert.Contains("Microsoft.Build.Logging.ConsoleLogger",
_initializedService
.RegisteredLoggerTypeNames);
306
Assert.NotNull(
_initializedService
.RegisteredSinkNames);
307
Assert.Single(
_initializedService
.RegisteredSinkNames);
321
_initializedService
.RegisterDistributedLogger(null, null);
333
_initializedService
.ShutdownComponent();
340
_initializedService
.RegisterDistributedLogger(null, description);
361
Assert.True(
_initializedService
.RegisterDistributedLogger(regularILogger, configurableDescription));
362
Assert.True(
_initializedService
.RegisterDistributedLogger(null, distributedDescription));
363
Assert.NotNull(
_initializedService
.RegisteredLoggerTypeNames);
366
Assert.Equal(4,
_initializedService
.RegisteredLoggerTypeNames.Count);
367
Assert.Contains("Microsoft.Build.Logging.ConfigurableForwardingLogger",
_initializedService
.RegisteredLoggerTypeNames);
368
Assert.Contains("Microsoft.Build.UnitTests.Logging.LoggingService_Tests+RegularILogger",
_initializedService
.RegisteredLoggerTypeNames);
369
Assert.Contains("Microsoft.Build.Logging.DistributedFileLogger",
_initializedService
.RegisteredLoggerTypeNames);
370
Assert.Contains("Microsoft.Build.BackEnd.Logging.NullCentralLogger",
_initializedService
.RegisteredLoggerTypeNames);
373
Assert.NotNull(
_initializedService
.RegisteredSinkNames);
374
Assert.Equal(2,
_initializedService
.RegisteredSinkNames.Count);
375
Assert.Equal(2,
_initializedService
.LoggerDescriptions.Count);
399
Assert.True(
_initializedService
.RegisterDistributedLogger(regularILoggerA, configurableDescriptionA));
400
Assert.True(
_initializedService
.RegisterDistributedLogger(regularILoggerB, configurableDescriptionB));
401
Assert.True(
_initializedService
.RegisterLogger(regularILoggerC));
402
Assert.NotNull(
_initializedService
.RegisteredLoggerTypeNames);
404
_initializedService
.LogBuildStarted();
409
_initializedService
.LogBuildFinished(true);
415
_initializedService
.LogBuildStarted();
421
_initializedService
.LogBuildFinished(true);
441
Assert.True(
_initializedService
.RegisterDistributedLogger(regularILogger, description));
442
Assert.False(
_initializedService
.RegisterDistributedLogger(regularILogger, description));
445
Assert.Equal(2,
_initializedService
.RegisteredLoggerTypeNames.Count);
446
Assert.Contains("Microsoft.Build.Logging.ConfigurableForwardingLogger",
_initializedService
.RegisteredLoggerTypeNames);
447
Assert.Contains("Microsoft.Build.UnitTests.Logging.LoggingService_Tests+RegularILogger",
_initializedService
.RegisteredLoggerTypeNames);
450
Assert.NotNull(
_initializedService
.RegisteredSinkNames);
451
Assert.Single(
_initializedService
.RegisteredSinkNames);
452
Assert.Single(
_initializedService
.LoggerDescriptions);
469
Assert.True(
_initializedService
.RegisterDistributedLogger(regularILogger, description));
470
Assert.True(
_initializedService
.RegisterDistributedLogger(null, description));
471
Assert.Equal(4,
_initializedService
.RegisteredLoggerTypeNames.Count);
475
foreach (string loggerName in
_initializedService
.RegisteredLoggerTypeNames)
484
Assert.Contains("Microsoft.Build.BackEnd.Logging.NullCentralLogger",
_initializedService
.RegisteredLoggerTypeNames);
485
Assert.Contains("Microsoft.Build.UnitTests.Logging.LoggingService_Tests+RegularILogger",
_initializedService
.RegisteredLoggerTypeNames);
488
Assert.NotNull(
_initializedService
.RegisteredSinkNames);
489
Assert.Equal(2,
_initializedService
.RegisteredSinkNames.Count);
490
Assert.Equal(2,
_initializedService
.LoggerDescriptions.Count);
504
_initializedService
.InitializeNodeLoggers(null, new EventSourceSink(), 3);
515
_initializedService
.InitializeNodeLoggers(new List<LoggerDescription>(), new EventSourceSink(), 3);
532
_initializedService
.ShutdownComponent();
535
_initializedService
.InitializeNodeLoggers(tempList, new EventSourceSink(), 2);
558
_initializedService
.InitializeNodeLoggers(loggerDescriptions, sink, 1);
561
_initializedService
.InitializeNodeLoggers(loggerDescriptions, sink2, 1);
564
_initializedService
.InitializeNodeLoggers(loggerDescriptions, sink, 1);
566
Assert.NotNull(
_initializedService
.RegisteredLoggerTypeNames);
569
Assert.Equal(6,
_initializedService
.RegisteredLoggerTypeNames.Count);
570
Assert.Contains("Microsoft.Build.Logging.ConfigurableForwardingLogger",
_initializedService
.RegisteredLoggerTypeNames);
571
Assert.Contains("Microsoft.Build.BackEnd.Logging.CentralForwardingLogger",
_initializedService
.RegisteredLoggerTypeNames);
574
foreach (string loggerName in
_initializedService
.RegisteredLoggerTypeNames)
586
foreach (string loggerName in
_initializedService
.RegisteredLoggerTypeNames)
598
Assert.NotNull(
_initializedService
.RegisteredSinkNames);
599
Assert.Equal(2,
_initializedService
.RegisteredSinkNames.Count);
602
Assert.Empty(
_initializedService
.LoggerDescriptions);
619
Assert.True(
_initializedService
.RegisterDistributedLogger(regularILogger, description));
620
Assert.False(
_initializedService
.RegisterDistributedLogger(regularILogger, description));
623
Assert.Equal(2,
_initializedService
.RegisteredLoggerTypeNames.Count);
624
Assert.Contains("Microsoft.Build.Logging.ConfigurableForwardingLogger",
_initializedService
.RegisteredLoggerTypeNames);
625
Assert.Contains("Microsoft.Build.UnitTests.Logging.LoggingService_Tests+RegularILogger",
_initializedService
.RegisteredLoggerTypeNames);
628
Assert.NotNull(
_initializedService
.RegisteredSinkNames);
629
Assert.Single(
_initializedService
.RegisteredSinkNames);
630
Assert.Single(
_initializedService
.LoggerDescriptions);
1016
_initializedService
.RegisterLogger(new ConsoleLogger(LoggerVerbosity.Quiet));
1017
_initializedService
.MinimumRequiredMessageImportance.ShouldBe(MessageImportance.High - 1);
1018
_initializedService
.RegisterLogger(new ConsoleLogger(LoggerVerbosity.Minimal));
1019
_initializedService
.MinimumRequiredMessageImportance.ShouldBe(MessageImportance.High);
1020
_initializedService
.RegisterLogger(new ConsoleLogger(LoggerVerbosity.Normal));
1021
_initializedService
.MinimumRequiredMessageImportance.ShouldBe(MessageImportance.Normal);
1022
_initializedService
.RegisterLogger(new ConsoleLogger(LoggerVerbosity.Detailed));
1023
_initializedService
.MinimumRequiredMessageImportance.ShouldBe(MessageImportance.Low);
1024
_initializedService
.RegisterLogger(new ConsoleLogger(LoggerVerbosity.Diagnostic));
1025
_initializedService
.MinimumRequiredMessageImportance.ShouldBe(MessageImportance.Low);
1031
_initializedService
.RegisterLogger(CreateConfigurableForwardingLogger(LoggerVerbosity.Quiet));
1032
_initializedService
.MinimumRequiredMessageImportance.ShouldBe(MessageImportance.High - 1);
1033
_initializedService
.RegisterLogger(CreateConfigurableForwardingLogger(LoggerVerbosity.Minimal));
1034
_initializedService
.MinimumRequiredMessageImportance.ShouldBe(MessageImportance.High);
1035
_initializedService
.RegisterLogger(CreateConfigurableForwardingLogger(LoggerVerbosity.Normal));
1036
_initializedService
.MinimumRequiredMessageImportance.ShouldBe(MessageImportance.Normal);
1037
_initializedService
.RegisterLogger(CreateConfigurableForwardingLogger(LoggerVerbosity.Detailed));
1038
_initializedService
.MinimumRequiredMessageImportance.ShouldBe(MessageImportance.Low);
1039
_initializedService
.RegisterLogger(CreateConfigurableForwardingLogger(LoggerVerbosity.Diagnostic));
1040
_initializedService
.MinimumRequiredMessageImportance.ShouldBe(MessageImportance.Low);
1072
_initializedService
.RegisterLogger(new ConsoleLogger(LoggerVerbosity.Normal));
1073
_initializedService
.RegisterLogger(new MockLogger() { Verbosity = LoggerVerbosity.Normal });
1074
_initializedService
.RegisterLogger(CreateConfigurableForwardingLogger(LoggerVerbosity.Normal));
1075
_initializedService
.MinimumRequiredMessageImportance.ShouldBe(MessageImportance.Low);
1116
_initializedService
.RegisterDistributedLogger(null, centralLoggerDescrption);
1120
_initializedService
.RegisterLogger(logger);
1125
_initializedService
.ShutdownComponent();