Пример #1
0
    public void StackIsSimplified()
    {
        Func <Task> call = OuterMethodAsync;
        Exception   ex   = call.Should().Throw <InvalidOperationException>().Which;

        var originalStack   = new StackTrace(ex).GetFrames();
        var simplifiedStack = StackTraceHelper.SimplifyStackTrace(ex);

        simplifiedStack.Count().Should().BeLessThan(originalStack.Length);
    }