Пример #1
0
        public void FilterByNamespace_BeginEnabled(string namespaceFilter, string loggerName, bool enabled)
        {
            // Arrange
            var options = new TestLoggerOptions();

            // Act
            options.FilterByNamespace(namespaceFilter);

            // Assert
            Assert.NotNull(options.BeginEnabled);
            Assert.Equal(enabled, options.BeginEnabled !(new BeginScopeContext(loggerName, null)));
        }
Пример #2
0
        public void FilterByNamespace_WriteEnabled(string namespaceFilter, string loggerName, bool enabled)
        {
            // Arrange
            var options = new TestLoggerOptions();

            // Act
            options.FilterByNamespace(namespaceFilter);

            // Assert
            Assert.NotNull(options.WriteEnabled);
            Assert.Equal(enabled, options.WriteEnabled !(new WriteContext(0, 0, null, null, null, loggerName, string.Empty, System.Array.Empty <IScope>())));
        }