public override void EndTest (TestCase testCase, TestCaseResult result) { if (result.HasSkipped ()) Console.WriteLine ("SKIPPED: {0}", testCase.Name); else if (result.HasPassed ()) Console.WriteLine ("PASSED: {0}", testCase.Name); #if false else if (result.HasWarnings ()) Console.WriteLine ("PASSED with warnings: {0}", testCase.Name); #endif else Console.WriteLine ("***FAILED: {0}", testCase.Name); }
public void FailIfEqual (TestCase testCase, object expected, object actual) { FailIfEqual (testCase, null, expected, actual); }
public void WarnIfNot (TestCase testCase, bool condition) { WarnIf (testCase, !condition); }
public void FailIfNot (TestCase testCase, bool condition) { FailIf (testCase, !condition); }
public void WarnIf (TestCase testCase, bool condition) { WarnIf (testCase, null, condition); }
public void Fail (TestCase testCase, string message) { AddFailure (testCase, new TestFailedException (message)); }
protected virtual void AddError (TestCase testCase, Exception e) { if (testResult != null) { testResult.StatusNotify (testCase, new TestStatus (TestStatusCode.Error, e)); } hasErrors = true; }
public void WarnIfNotSame (TestCase testCase, object expected, object actual) { WarnIfNotSame (testCase, null, expected, actual); }
public void WarnIfEqual(TestCase testCase, object expected, object actual) { WarnIfEqual(testCase, null, expected, actual); }
public void FailIfEqual(TestCase testCase, object expected, object actual) { FailIfEqual(testCase, null, expected, actual); }
public void WarnIfNot(TestCase testCase, string message, bool condition) { WarnIf(testCase, message, !condition); }
public void WarnIfNot(TestCase testCase, bool condition) { WarnIf(testCase, !condition); }
public void FailIfNot(TestCase testCase, string message, bool condition) { FailIf(testCase, message, !condition); }
public void FailIfNot(TestCase testCase, bool condition) { FailIf(testCase, !condition); }
public void WarnIf(TestCase testCase, bool condition) { WarnIf(testCase, null, condition); }
public void WarnIfEqual (TestCase testCase, object expected, object actual) { WarnIfEqual (testCase, null, expected, actual); }
public void FailIfSame (TestCase testCase, string message, object expected, object actual) { FailIf (testCase, ConcatMessages (message, "Expected the same reference value."), expected == actual); }
public void FailIfSame(TestCase testCase, string message, object expected, object actual) { FailIf(testCase, ConcatMessages(message, "Expected the same reference value."), expected == actual); }
public void RunCase (TestCase testCase) { try { testCase.RunCase (this); } catch (TestSkippedException e) { SkipTest (testCase, e); } catch (TestFailedException e) { AddFailure (testCase, e); } catch (Exception e) { AddError (testCase, e); } }
public void FailIfNotSame(TestCase testCase, object expected, object actual) { FailIfNotSame(testCase, null, expected, actual); }
protected virtual void AddWarning (TestCase testCase, TestFailedException e) { if (testResult != null) { testResult.StatusNotify (testCase, new TestStatus (TestStatusCode.Warning, e)); } hasWarnings = true; }
public void WarnIfNotSame(TestCase testCase, object expected, object actual) { WarnIfNotSame(testCase, null, expected, actual); }
public void FailIf(TestCase testCase, bool condition) { FailIf(testCase, null, condition); }
public void WarnIfNotSame(TestCase testCase, string message, object expected, object actual) { WarnIf(testCase, ConcatMessages(message, "Expected the same reference value."), expected != actual); }
public void WarnIf (TestCase testCase, string message, bool condition) { if (condition) AddWarning (testCase, new TestFailedException (message)); }
public void Fail(TestCase testCase) { Fail(testCase, null); }
public void FailIfNot (TestCase testCase, string message, bool condition) { FailIf (testCase, message, !condition); }
public void Fail(TestCase testCase, string message) { AddFailure(testCase, new TestFailedException(message)); }
public void WarnIfNot (TestCase testCase, string message, bool condition) { WarnIf (testCase, message, !condition); }
public void Warn(TestCase testCase) { Warn(testCase, null); }
public void FailIfEqual (TestCase testCase, string message, object expected, object actual) { if (AreEqual (expected, actual)) AddFailure (testCase, new ComparisonException (message, expected, actual)); }
private void StartTest (TestCase testCase) { lock (listeners.SyncRoot) { runCount++; foreach (ITestListener listener in listeners) { listener.StartTest (testCase); } } }
public void WarnIfNotEqual (TestCase testCase, string message, object expected, object actual) { if (!AreEqual (expected, actual)) AddWarning (testCase, new ComparisonException (message, expected, actual)); }
private void EndTest (TestCase testCase, TestCaseResult testCaseResult) { lock (listeners.SyncRoot) { if (testCaseResult.HasPassed ()) { passedCount++; } foreach (ITestListener listener in listeners) { listener.EndTest (testCase, testCaseResult); } } }
public void FailIfNotSame (TestCase testCase, object expected, object actual) { FailIfNotSame (testCase, null, expected, actual); }
public void StatusNotify (TestCase testCase, TestStatus status) { lock (listeners.SyncRoot) { switch (status.Code) { case TestStatusCode.Skipped: skippedCount++; break; case TestStatusCode.Warning: warningCount++; break; case TestStatusCode.Failure: failureCount++; break; case TestStatusCode.Error: errorCount++; break; } foreach (ITestListener listener in listeners) { listener.StatusNotify (testCase, status); } } }
public void WarnIfNotSame (TestCase testCase, string message, object expected, object actual) { WarnIf (testCase, ConcatMessages (message, "Expected the same reference value."), expected != actual); }
public override void StartTest (TestCase testCase) { Console.WriteLine ("STARTED: {0}", testCase.Name); }
protected virtual void SkipTest (TestCase testCase, TestSkippedException e) { if (testResult != null) { testResult.StatusNotify (testCase, new TestStatus (TestStatusCode.Skipped, e.Message)); } skipped = true; }
public override void StatusNotify (TestCase testCase, TestStatus status) { Console.WriteLine ("{0}", status); }
protected virtual void AddFailure (TestCase testCase, TestFailedException e) { if (testResult != null) { testResult.StatusNotify (testCase, new TestStatus (TestStatusCode.Failure, e)); } hasFailures = true; }
public void Warn (TestCase testCase, string message) { AddWarning (testCase, new TestFailedException (message)); }
public void Fail (TestCase testCase) { Fail (testCase, null); }
public void FailIf (TestCase testCase, bool condition) { FailIf (testCase, null, condition); }
public void Warn (TestCase testCase) { Warn (testCase, null); }
public void Warn(TestCase testCase, string message) { AddWarning(testCase, new TestFailedException(message)); }