Example #1
0
        private static void AddChildTest(Test parent, IMethodInfo method, string namePrefix, string nameSuffix)
        {
            Test test = new Test(namePrefix + method.Name + nameSuffix, method);

            test.IsTestCase = true;
            test.Kind       = TestKinds.Test;

            MbUnit2MetadataUtils.PopulateTestMetadata(test, method);

            parent.AddChild(test);
        }
        private static MbUnit2Test CreateTest(RunPipe runPipe)
        {
            IMemberInfo      member      = GuessMemberInfoFromRunPipe(runPipe);
            ICodeElementInfo codeElement = member ?? Reflector.Wrap(runPipe.FixtureType);

            MbUnit2Test test = new MbUnit2Test(runPipe.ShortName, codeElement, runPipe.Fixture, runPipe);

            test.Kind       = TestKinds.Test;
            test.IsTestCase = true;

            if (member != null)
            {
                MbUnit2MetadataUtils.PopulateTestMetadata(test, member);
            }

            return(test);
        }