TestFixture
TestFixture is a surrogate for a user test fixture class,
containing one or more tests.
using NUnit.Framework.Interfaces;
namespace NUnit.Framework.Internal
{
public class TestFixture : TestSuite, IDisposableFixture
{
public TestFixture(ITypeInfo fixtureType, object[] arguments = null)
: base(fixtureType, arguments)
{
base.SetUpMethods = Reflect.GetMethodsWithAttribute(base.TypeInfo.Type, typeof(SetUpAttribute), true);
base.TearDownMethods = Reflect.GetMethodsWithAttribute(base.TypeInfo.Type, typeof(TearDownAttribute), true);
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);
CheckSetUpTearDownMethods(base.SetUpMethods);
CheckSetUpTearDownMethods(base.TearDownMethods);
}
}
}