Ejemplo n.º 1
0
        public void ExtensionInsensitive_Should_AddDetail()
        {
            var logEvent  = new LogEvent <StandardLoglevel>(_ => { }, StandardLoglevel.Warning);
            var sensitive = SensitiveExtensions.Insensitive <StandardLoglevel>(logEvent);

            sensitive.Details.OfType <Sensitive>().Single().IsSensitive.Should().BeFalse();
        }
Ejemplo n.º 2
0
        public void AddInsensitive_Should_AddSensitiveDetail()
        {
            var logEvent = new LogEvent <StandardLoglevel>(_ => { }, StandardLoglevel.Warning);

            SensitiveExtensions.Insensitive <StandardLoglevel>(logEvent).Should().BeSameAs(logEvent);

            var sensitive = logEvent.Details.OfType <Sensitive>().Single();

            sensitive.IsSensitive.Should().BeFalse();
            sensitive.SetupName.Should().BeNull();
            sensitive.ToString().Should().Be("Insensitive");
        }
Ejemplo n.º 3
0
 public void ExtensionInsensitiveLogEventNull_ShouldThrow_ArgumentNullException()
 {
     Assert.Throws <ArgumentNullException>(() => SensitiveExtensions.Insensitive <StandardLoglevel>(null));
 }