/// <summary> /// Build a SetUpFixture from type provided. Normally called for a Type /// on which the attribute has been placed. /// </summary> /// <param name="typeInfo">The type info of the fixture to be used.</param> /// <returns>A SetUpFixture object as a TestSuite.</returns> public IEnumerable <TestSuite> BuildFrom(ITypeInfo typeInfo) { SetUpFixture fixture = new SetUpFixture(typeInfo); if (fixture.RunState != RunState.NotRunnable) { string reason = null; if (!IsValidFixtureType(typeInfo, ref reason)) { fixture.MakeInvalid(reason); } } return(new TestSuite[] { fixture }); }
public IEnumerable <TestSuite> BuildFrom(ITypeInfo typeInfo) { SetUpFixture fixture = new SetUpFixture(typeInfo); if (fixture.RunState != RunState.NotRunnable) { string?reason = null; if (!IsValidFixtureType(typeInfo, ref reason)) { fixture.MakeInvalid(reason); } } fixture.ApplyAttributesToTest(typeInfo.Type.GetTypeInfo()); return(new TestSuite[] { fixture }); }
public TestSuite BuildFrom(ITypeInfo typeInfo) { var setUpFixtureType = new DefaultNamespaceTypeWrapper(typeof(LuceneTestCase.SetUpFixture)); SetUpFixture fixture = new SetUpFixture(setUpFixtureType); if (fixture.RunState != RunState.NotRunnable) { string reason = null; if (!IsValidFixtureType(setUpFixtureType, ref reason)) { fixture.MakeInvalid(reason); } } fixture.ApplyAttributesToTest(setUpFixtureType.Type.GetTypeInfo()); return(fixture); }