24 using NUnit.Framework;
25 using NUnit.Framework.Internal;
26 using NUnit.Framework.Api;
28 namespace SiliconStudio.
Paradox.UnitTesting {
32 const string NUnitFrameworkExceptionPrefix =
"NUnit.Framework.";
34 static public bool IsIgnored (
this TestResult result)
36 return (result.ResultState.Status == TestStatus.Skipped);
39 static public bool IsSuccess (
this TestResult result)
41 return (result.ResultState.Status == TestStatus.Passed);
44 static public bool IsFailure (
this TestResult result)
46 return (result.ResultState.Status == TestStatus.Failed);
51 return (result.ResultState.Status == TestStatus.Inconclusive);
57 string m = result.Message;
59 return "Unknown error";
60 if (!m.StartsWith (NUnitFrameworkExceptionPrefix))
62 return m.Substring (m.IndexOf (
" : ") + 3);
static bool IsInconclusive(this TestResult result)
static bool IsFailure(this TestResult result)
static bool IsIgnored(this TestResult result)
static string GetMessage(this TestResult result)
static bool IsSuccess(this TestResult result)