Exemplo n.º 1
0
        public void Visit(TestSuite testSuite)
        {
            Code.Require(testSuite, "testSuite");

            if (BoostDataTestCaseVerifier.IsBoostDataTestCase(testSuite))
            {
                foreach (TestUnit child in testSuite.Children)
                {
                    // NOTE Since we have asserted that the suite is a BOOST_DATA_TEST_CASE,
                    //      all child instances are to be of type TestCase

                    var displayName = testSuite.Name + '/' + child.Name;
                    Visit((TestCase)child, displayName);
                }
            }
            else
            {
                foreach (TestUnit child in testSuite.Children)
                {
                    child.Apply(this);
                }
            }
        }
        /// <summary>
        /// Verifies if the test suite with the specified fully qualified name is a BOOST_DATA_TEST_CASE
        /// </summary>
        /// <param name="framework">The framework from which to locate the test suite</param>
        /// <param name="fullyQualifiedName">The test suite's fully qualified name</param>
        /// <returns>true if the test suite is a BOOST_DATA_TEST_CASE; false otherwise</returns>
        private static bool IsBoostDataTestCase(TestFramework framework, string fullyQualifiedName)
        {
            var suite = LocateSuite(framework, fullyQualifiedName);

            return((suite != null) && (BoostDataTestCaseVerifier.IsBoostDataTestCase(suite)));
        }