public void SetMaximumRoutablesForwardingCount_Should_SetProperty() { var builder = new LogfileConfigurationBuilder <StandardLoglevel>(); LogfileConfigurationBuilderExtensions.SetMaximumRoutablesForwardingCount <StandardLoglevel>(builder, 1); builder.MaximumRoutablesForwardingCount.Should().Be(1); }
public void EnableDeveloperModeForDebugCompilerFlag_Should_EnableDeveloperMode() { var builder = new LogfileConfigurationBuilder <StandardLoglevel>(); LogfileConfigurationBuilderExtensions.EnableDeveloperModeForDebugCompilerFlag <StandardLoglevel>(builder); builder.IsDeveloperModeEnabled.Should().BeTrue(); }
public void SetWaitForMoreRoutablesForwardingDelay_Should_SetProperty() { var builder = new LogfileConfigurationBuilder <StandardLoglevel>(); LogfileConfigurationBuilderExtensions.SetWaitForMoreRoutablesForwardingDelay <StandardLoglevel>(builder, TimeSpan.FromMilliseconds(1)); builder.WaitForMoreRoutablesForwardingDelay.Should().Be(TimeSpan.FromMilliseconds(1)); }
public void SetMaximumRoutableQueueLength_Should_SetProperty() { var builder = new LogfileConfigurationBuilder <StandardLoglevel>(); LogfileConfigurationBuilderExtensions.SetMaximumRoutableQueueLength <StandardLoglevel>(builder, 1); builder.MaximumRoutableQueueLength.Should().Be(1); }
public void AddRouter_Should_AddRouter() { var router = new TestRouter <LogEvent <StandardLoglevel> >(); var builder = new LogfileConfigurationBuilder <StandardLoglevel>(); LogfileConfigurationBuilderExtensions.AddRouter(builder, router); builder.Routers.Single().Should().BeSameAs(router); }
public void AddPreprocessor_Should_Succeed() { var preprocessor1 = Mock.Of <IRoutablePreprocessor <LogEvent <StandardLoglevel> > >(); var builder = new LogfileConfigurationBuilder <StandardLoglevel>(); LogfileConfigurationBuilderExtensions.AddPreprocessor <StandardLoglevel>(builder, preprocessor1); builder.Preprocessors.Should().Contain(preprocessor1); }
public void BlockLoglevelSingle_Should_AddLoglevel() { var builder = new LogfileConfigurationBuilder <StandardLoglevel>(); LogfileConfigurationBuilderExtensions.BlockLoglevel <StandardLoglevel>(builder, StandardLoglevel.Warning); builder.BlockLoglevels.Count.Should().Be(1); builder.BlockLoglevels.Should().Contain(StandardLoglevel.Warning); }
public void BlockLoglevelsFromToInverted_Should_AddLoglevel() { var builder = new LogfileConfigurationBuilder <StandardLoglevel>(); LogfileConfigurationBuilderExtensions.BlockLoglevels <StandardLoglevel>(builder, StandardLoglevel.Warning, StandardLoglevel.Error); builder.BlockLoglevels.Count.Should().Be(2); builder.BlockLoglevels.Should().Contain(StandardLoglevel.Warning); builder.BlockLoglevels.Should().Contain(StandardLoglevel.Error); }
public void UseLogEventsFromExceptionData_Should_AddPreprocessor() { // Arrange var builder = new LogfileConfigurationBuilder <StandardLoglevel>(); // Act LogfileConfigurationBuilderExtensions.UseLogEventsFromExceptionData <StandardLoglevel>(builder); // Assert builder.Preprocessors.OfType <ExtractLogEventsFromExceptions <StandardLoglevel> >().Count().Should().Be(1); }
public void BlockLoglevelFromToSelfNull_ShouldThrow_ArgumentNullException() { Assert.Throws <ArgumentNullException>(() => LogfileConfigurationBuilderExtensions.BlockLoglevels <StandardLoglevel>(null, StandardLoglevel.Warning, StandardLoglevel.Error)); }
public void AddRouterNull_ShouldThrow_ArgumentNullException() { var builder = new LogfileConfigurationBuilder <StandardLoglevel>(); Assert.Throws <ArgumentNullException>(() => LogfileConfigurationBuilderExtensions.AddRouter(builder, null)); }
public void AddRouterSelfNull_ShouldThrow_ArgumentNullException() { Assert.Throws <ArgumentNullException>(() => LogfileConfigurationBuilderExtensions.AddRouter(null, Mock.Of <IRouter <LogEvent <StandardLoglevel> > >())); }
public void UseLogEventsFromExceptionDataSelfNull_ShouldThrow_ArgumentNullException() { Assert.Throws <ArgumentNullException>(() => LogfileConfigurationBuilderExtensions.UseLogEventsFromExceptionData <StandardLoglevel>(null)); }
public void SetMaximumRoutablesForwardingCount_ShouldThrows_ArgumentNullException() { Assert.Throws <ArgumentNullException>(() => LogfileConfigurationBuilderExtensions.SetMaximumRoutablesForwardingCount <StandardLoglevel>(null, 1)); }
public void EnableDeveloperModeForDebugCompilerFlagSelfNull_ShouldThrow_ArgumentNullException() { Assert.Throws <ArgumentNullException>(() => LogfileConfigurationBuilderExtensions.EnableDeveloperModeForDebugCompilerFlag <StandardLoglevel>(null)); }
public void SetMaximumRoutableQueueLengthSelfNull_ShouldThrows_ArgumentNullException() { Assert.Throws <ArgumentNullException>(() => LogfileConfigurationBuilderExtensions.SetMaximumRoutableQueueLength <StandardLoglevel>(null, 1)); }
public void AllowLoglevelSingleSelfNull_ShouldThrow_ArgumentNullException() { Assert.Throws <ArgumentNullException>(() => LogfileConfigurationBuilderExtensions.AllowLoglevel <StandardLoglevel>(null, StandardLoglevel.Warning)); }
public void SetWaitForMoreRoutablesForwardingDelaySelfNull_ShouldThrow_ArgumentNullException() { Assert.Throws <ArgumentNullException>(() => LogfileConfigurationBuilderExtensions.SetWaitForMoreRoutablesForwardingDelay <StandardLoglevel>(null, TimeSpan.FromSeconds(1))); }