Esempio n. 1
0
        public void AsyncFriendlyStackTraceEnricher_Constructor()
        {
            var asyncFriendlyStackTraceEnricher = new AsyncFriendlyStackTraceEnricher();

            asyncFriendlyStackTraceEnricher.Should().NotBeNull().And.Subject.Should()
            .BeAssignableTo <ILogEventEnricher>();
        }
Esempio n. 2
0
        public void AsyncFriendlyStackTraceEnricher_Enrich_Null()
        {
            var asyncFriendlyStackTraceEnricher = new AsyncFriendlyStackTraceEnricher();

            Action act = () => asyncFriendlyStackTraceEnricher.Enrich(null, null);

            act.Should().Throw <ArgumentNullException>().And.ParamName.Should().Be("logEvent");

            act = () => asyncFriendlyStackTraceEnricher.Enrich(new LogEvent(DateTimeOffset.UtcNow, LogEventLevel.Debug, null, MessageTemplate.Empty, new List <LogEventProperty>()), null);

            act.Should().Throw <ArgumentNullException>().And.ParamName.Should().Be("propertyFactory");
        }