private static MbUnit2Test CreateFixtureTest(Fixture fixture)
        {
            ITypeInfo   fixtureType = Reflector.Wrap(fixture.Type);
            MbUnit2Test test        = new MbUnit2Test(fixtureType.Name, fixtureType, fixture, null);

            test.Kind = TestKinds.Fixture;

            MbUnit2MetadataUtils.PopulateFixtureMetadata(test, fixtureType);
            return(test);
        }
Exemplo n.º 2
0
        private void BuildTestFixtureFromPatternAttribute(Test parent, ITypeInfo type, TestFixturePatternAttribute2 attrib)
        {
            Test fixtureTest = new Test(type.Name, type);

            fixtureTest.Kind = TestKinds.Fixture;

            MbUnit2MetadataUtils.PopulateFixtureMetadata(fixtureTest, type);

            TestFixtureAttribute2 fixtureAttrib = attrib as TestFixtureAttribute2;

            if (fixtureAttrib != null)
            {
                PopulateTestFixture(fixtureTest, type, fixtureAttrib);
            }
            else
            {
                ThrowUnsupportedAttribute(attrib);
            }

            parent.AddChild(fixtureTest);
        }