Exemple #1
0
        public void Append_WithExceptionAndMessage()
        {
            var exception = new Exception("ExceptionAndMessage");

            _sentryAppender.DoAppendUnderTest(CreateLoggingEvent("Custom message", exception));

            _ravenClientMock.Verify(rc => rc.Capture(It.Is <SentryEvent>(w => w.Message == "Custom message")));
        }
Exemple #2
0
        public void Append_WithExceptionAndMessage()
        {
            var exception = new Exception("ExceptionAndMessage");

            _sentryAppender.DoAppendUnderTest(CreateLoggingEvent("Custom message", exception));

            _ravenClientMock.Verify(
                rc => rc.CaptureException(It.Is <Exception>(e => Object.ReferenceEquals(e, exception)),
                                          It.Is <SentryMessage>(sm => sm.Message == "Custom message"),
                                          It.IsAny <ErrorLevel>(),
                                          It.IsAny <IDictionary <string, string> >(),
                                          It.IsAny <object>()),
                Times.Once);
        }
Exemple #3
0
        public void Append_TestGeneralEventProperties()
        {
            _sentryAppender.DoAppendUnderTest(CreateLoggingEvent("TestMessage"));

            Assert.That(_testEvent.Level, Is.EqualTo(ErrorLevel.Error));
        }