public static void OnAssertInconclusive(string message) { var handler = OnAssertCompleted; if (handler != null) { handler(null, new AssertCompletedEventArgs(TestResult.Inconclusive(message))); } }
public TestResult Run() { TestResult result; var duration = new TimeSpan(); try { AssertHandler.OnAssertCompleted += HandleAssertCompleted; duration = _hostApp.TimedMethodCall(_projectName, _moduleName, _methodName); AssertHandler.OnAssertCompleted -= HandleAssertCompleted; result = EvaluateResults(); } catch (Exception exception) { result = TestResult.Inconclusive("Test raised an error. " + exception.Message); } return(new TestResult(result, duration.Milliseconds)); }
public TestResult Run() { _assertResults.Clear(); //clear previous results to account for changes being made TestResult result; var duration = new TimeSpan(); try { AssertHandler.OnAssertCompleted += HandleAssertCompleted; duration = _hostApp.TimedMethodCall(_qualifiedMemberName); AssertHandler.OnAssertCompleted -= HandleAssertCompleted; result = EvaluateResults(); } catch (Exception exception) { result = TestResult.Inconclusive("Test raised an error. " + exception.Message); } return(new TestResult(result, duration.Milliseconds)); }