public void ToString_StringContains_ExceptionInformation() { var exception = TestHelper.GetException(); var sentryException = new SentryException(exception); var stacktraceString = sentryException.ToString(); Assert.That(stacktraceString, Contains.Substring(exception.GetType().FullName)); Assert.That(stacktraceString, Contains.Substring(exception.Message)); }
public void ToString_StringIsEqualTo_ExceptionToString() { var exception = TestHelper.GetException(); var sentryException = new SentryException(exception); string exceptionString = exception.ToString(); string stacktraceString = sentryException.ToString(); Console.WriteLine(exceptionString); Console.WriteLine(); Console.WriteLine(stacktraceString); Assert.That(stacktraceString, Is.EqualTo(exceptionString)); }