Exemplo n.º 1
0
        public override IEnumerable <XunitTestCase> TestCases()
        {
            List <object> children = Children;

            if (children != null && children.Count > 0)
            {
                foreach (object child in children)
                {
                    CTestCase tc = child as CTestCase;
                    if (tc != null)
                    {
                        if (CModInfo.IsTestCaseSelected(tc.Name))
                        {
                            tc.Init();
                            foreach (XunitTestCase testCase in tc.TestCases())
                            {
                                yield return(testCase);
                            }
                        }
                    }
                }
            }
        }
Exemplo n.º 2
0
        public override tagVARIATION_STATUS Execute()
        {
            List <object> children = Children;

            if (children != null && children.Count > 0)
            {
                // this is not a leaf node, just invoke all the children's execute
                foreach (object child in children)
                {
                    CTestCase tc = child as CTestCase;
                    if (tc != null)
                    {
                        if (CModInfo.IsTestCaseSelected(tc.Name))
                        {
                            Console.WriteLine("TestCase:{0} - {1}", tc.Attribute.Name, tc.Attribute.Desc);
                            tc.Init();
                            tc.Execute();
                        }
                    }
                }
            }
            Console.WriteLine("Pass:{0}, Fail:{1}, Skip:{2}", PassCount, FailCount, SkipCount);
            return(tagVARIATION_STATUS.eVariationStatusPassed);
        }