NUnit.Framework.Assert.GetStackTrace()

Here are the examples of the csharp api class NUnit.Framework.Assert.GetStackTrace() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2 Examples 7

1. Example

Project: nunit
Source File: Assert.cs
View license
private static void IssueWarning(string message)
        {
            var result = TestExecutionContext.CurrentContext.CurrentResult;
            result.RecordAssertion(AssertionStatus.Warning, message, GetStackTrace());
        }

2. Example

Project: nunit
Source File: Assert.cs
View license
private static void ReportFailure(string message)
        {
            // If we are outside any multiple assert block, then throw
            if (TestExecutionContext.CurrentContext.MultipleAssertLevel == 0)
                throw new AssertionException(message);

            // Otherwise, just record the failure in an <assertion> element
            var result = TestExecutionContext.CurrentContext.CurrentResult;
            result.RecordAssertion(AssertionStatus.Failed, message, GetStackTrace());
        }