public void FilterByTypeName_WriteEnabled(string loggerName, bool enabled) { // Arrange var options = new TestSinkOptions(); // Act options.FilterByTypeName <C>(); // Assert Assert.NotNull(options.WriteEnabled); Assert.Equal(enabled, options.WriteEnabled !(new WriteContext(0, 0, null, null, null, loggerName, string.Empty))); }
public void FilterByTypeName_BeginEnabled(string loggerName, bool enabled) { // Arrange var options = new TestSinkOptions(); // Act options.FilterByTypeName <C>(); // Assert Assert.NotNull(options.BeginEnabled); Assert.Equal(enabled, options.BeginEnabled !(new BeginScopeContext(loggerName, null))); }
public void SetMinimumLevel_WriteEnabled(LogLevel minimumLevel, LogLevel logLevel, bool enabled) { // Arrange var options = new TestSinkOptions(); // Act options.FilterByMinimumLevel(minimumLevel); // Assert Assert.NotNull(options.WriteEnabled); Assert.Equal(enabled, options.WriteEnabled !(new WriteContext(logLevel, 0, null, null, null, string.Empty, string.Empty))); }