SetUpFixture
SetUpFixture extends TestSuite and supports
Setup and TearDown methods.
using NUnit.Framework.Interfaces;
namespace NUnit.Framework.Internal
{
public class SetUpFixture : TestSuite, IDisposableFixture
{
public SetUpFixture(ITypeInfo type)
: base(type, null)
{
base.Name = type.Namespace;
if (base.Name == null)
base.Name = "[default namespace]";
int num = base.Name.LastIndexOf('.');
if (num > 0)
base.Name = base.Name.Substring(num + 1);
base.OneTimeSetUpMethods = Reflect.GetMethodsWithAttribute(base.TypeInfo.Type, typeof(OneTimeSetUpAttribute), true);
base.OneTimeTearDownMethods = Reflect.GetMethodsWithAttribute(base.TypeInfo.Type, typeof(OneTimeTearDownAttribute), true);
CheckSetUpTearDownMethods(base.OneTimeSetUpMethods);
CheckSetUpTearDownMethods(base.OneTimeTearDownMethods);
}
}
}