예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
        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;
        }
예제 #4
0
        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;
        }