NUnit.Core.TestMethod.doRun(TestCaseResult)

Here are the examples of the csharp api NUnit.Core.TestMethod.doRun(TestCaseResult) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Examples 7

19 Source : TestMethod.cs
with MIT License
from roozbehid

public override void Run(TestCaseResult testResult)
		{ 
			try
			{
				if ( this.Parent != null)
					Fixture = this.Parent.Fixture;

				if (!testResult.IsFailure)
				{
					// Temporary... to allow for tests that directly execute a test case
					if (Fixture == null)
						Fixture = Reflect.Construct(this.FixtureType);

                    if (this.Properties["_SETCULTURE"] != null)
                        TestContext.CurrentCulture =
                            new System.Globalization.CultureInfo((string)Properties["_SETCULTURE"]);
                    
                    doRun(testResult);
				}
			}
			catch (Exception ex)
			{
				if (ex is NUnitException)
					ex = ex.InnerException;

				RecordException(ex, testResult);
			}
			finally
			{
				Fixture = null;
			}
		}