21 using NUnit.Framework.Api;
29 const string NUnitFrameworkExceptionPrefix =
"NUnit.Framework.";
31 static public bool IsIgnored(
this ITestResult result)
33 return (result.ResultState.Status == TestStatus.Skipped);
36 static public bool IsSuccess(
this ITestResult result)
38 return (result.ResultState.Status == TestStatus.Passed);
41 static public bool IsFailure(
this ITestResult result)
43 return (result.ResultState.Status == TestStatus.Failed);
48 return (result.ResultState.Status == TestStatus.Inconclusive);
54 string m = result.Message;
56 return "Unknown error";
57 if (!m.StartsWith(NUnitFrameworkExceptionPrefix))
59 return m.Substring(m.IndexOf(
" : ") + 3);
static string GetMessage(this ITestResult result)
static bool IsIgnored(this ITestResult result)
static bool IsFailure(this ITestResult result)
static bool IsInconclusive(this ITestResult result)
static bool IsSuccess(this ITestResult result)