Here are the examples of the csharp api NUnit.Core.TestCase.Run(TestCaseResult) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Examples
19
Source : TestCase.cs
with MIT License
from roozbehid
with MIT License
from roozbehid
public override TestResult Run( EventListener listener )
{
using( new TestContext() )
{
TestCaseResult testResult = MakeTestCaseResult();
listener.TestStarted( this.TestName );
long startTime = DateTime.Now.Ticks;
switch (this.RunState)
{
case RunState.Runnable:
case RunState.Explicit:
Run(testResult);
break;
case RunState.Skipped:
testResult.Skip(IgnoreReason);
break;
default:
case RunState.NotRunnable:
case RunState.Ignored:
testResult.Ignore(IgnoreReason);
break;
}
long stopTime = DateTime.Now.Ticks;
double time = ((double)(stopTime - startTime)) / (double)TimeSpan.TicksPerSecond;
testResult.Time = time;
listener.TestFinished(testResult);
return testResult;
}
}