private static Test CreateFixtureFromType(ITypeInfo fixtureType, Action <Test> consumer)
        {
            CSUnitTest fixtureTest = new CSUnitTest(fixtureType.Name, fixtureType);

            fixtureTest.LocalIdHint = fixtureType.FullName; // used to do reverse lookup
            fixtureTest.Kind        = TestKinds.Fixture;

            PopulateFixtureMetadata(fixtureType, fixtureTest.Metadata);

            if (consumer != null)
            {
                consumer(fixtureTest);
            }

            return(fixtureTest);
        }
        private static Test CreateTestFromMethod(IMethodInfo methodType, Action <Test> consumer)
        {
            CSUnitTest method = new CSUnitTest(methodType.Name, methodType);

            method.LocalIdHint = methodType.DeclaringType.FullName + @"." + methodType.Name; // used to do reverse lookup
            method.Kind        = TestKinds.Test;
            method.IsTestCase  = true;

            PopulateMethodMetadata(methodType, method.Metadata);

            if (consumer != null)
            {
                consumer(method);
            }

            return(method);
        }
        private static Test CreateTestFromMethod(IMethodInfo methodType, Action<Test> consumer)
        {
            CSUnitTest method = new CSUnitTest(methodType.Name, methodType);
            method.LocalIdHint = methodType.DeclaringType.FullName + @"." + methodType.Name; // used to do reverse lookup
            method.Kind = TestKinds.Test;
            method.IsTestCase = true;

            PopulateMethodMetadata(methodType, method.Metadata);

            if (consumer != null)
                consumer(method);

            return method;
        }
        private static Test CreateFixtureFromType(ITypeInfo fixtureType, Action<Test> consumer)
        {
            CSUnitTest fixtureTest = new CSUnitTest(fixtureType.Name, fixtureType);
            fixtureTest.LocalIdHint = fixtureType.FullName; // used to do reverse lookup
            fixtureTest.Kind = TestKinds.Fixture;

            PopulateFixtureMetadata(fixtureType, fixtureTest.Metadata);

            if (consumer != null)
                consumer(fixtureTest);

            return fixtureTest;
        }