Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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;
        }
Exemplo n.º 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;
        }