Here are the examples of the csharp api NUnit.Core.TestSuite.CreateUserFixture() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Examples
19
Source : TestSuite.cs
with MIT License
from roozbehid
with MIT License
from roozbehid
protected virtual void DoOneTimeSetUp(TestResult suiteResult)
{
if (FixtureType != null)
{
try
{
if (Fixture == null) // In case TestFixture was created with fixture object
CreateUserFixture();
if (this.Properties["_SETCULTURE"] != null)
TestContext.CurrentCulture =
new System.Globalization.CultureInfo((string)Properties["_SETCULTURE"]);
if (this.fixtureSetUp != null)
Reflect.InvokeMethod(fixtureSetUp, Fixture);
}
catch (Exception ex)
{
if (ex is NUnitException || ex is System.Reflection.TargetInvocationException)
ex = ex.InnerException;
if (IsIgnoreException(ex))
{
this.RunState = RunState.Ignored;
suiteResult.Ignore(ex.Message);
suiteResult.StackTrace = ex.StackTrace;
this.IgnoreReason = ex.Message;
}
else
{
if (IsreplacedertException(ex))
suiteResult.Failure(ex.Message, ex.StackTrace, FailureSite.SetUp);
else
suiteResult.Error(ex, FailureSite.SetUp);
}
}
}
}