/// <summary>
		/// Method to create a test case from a MethodInfo and add
		/// it to the fixture being built. It first checks to see if
		/// any global TestCaseBuilder addin wants to build the
		/// test case. If not, it uses the internal builder
		/// collection maintained by this fixture builder. After
		/// building the test case, it applies any decorators
		/// that have been installed.
		/// 
		/// The default implementation has no test case builders.
		/// Derived classes should add builders to the collection
		/// in their constructor.
		/// </summary>
		/// <param name="method">The MethodInfo for which a test is to be created</param>
        /// <param name="suite">The test suite being built.</param>
		/// <returns>A newly constructed Test</returns>
		private Test BuildTestCase( MethodInfo method, TestSuite suite )
		{
#if NUNITLITE
            return testBuilder.CanBuildFrom(method, suite)
                ? testBuilder.BuildFrom(method, suite)
                : null;
#else
            Test test = testBuilder.BuildFrom( method, suite );

			if ( test != null )
				test = testDecorators.Decorate( test, method );

			return test;
#endif
		}
        /// <summary>
        /// Method to create a test case from a MethodInfo and add
        /// it to the fixture being built. It first checks to see if
        /// any global TestCaseBuilder addin wants to build the
        /// test case. If not, it uses the internal builder
        /// collection maintained by this fixture builder. After
        /// building the test case, it applies any decorators
        /// that have been installed.
        ///
        /// The default implementation has no test case builders.
        /// Derived classes should add builders to the collection
        /// in their constructor.
        /// </summary>
        /// <param name="method"></param>
        /// <returns></returns>
        private Test BuildTestCase(MethodInfo method, TestSuite suite)
        {
            Test test = testBuilders.BuildFrom(method, suite);

            if (test != null)
            {
                test = testDecorators.Decorate(test, method);
            }

            return(test);
        }
示例#3
0
 /// <summary>
 /// Method to create a test case from a MethodInfo and add
 /// it to the fixture being built. It first checks to see if
 /// any global TestCaseBuilder addin wants to build the
 /// test case. If not, it uses the internal builder
 /// collection maintained by this fixture builder. After
 /// building the test case, it applies any decorators
 /// that have been installed.
 ///
 /// The default implementation has no test case builders.
 /// Derived classes should add builders to the collection
 /// in their constructor.
 /// </summary>
 /// <param name="method">The MethodInfo for which a test is to be created</param>
 /// <param name="suite">The test suite being built.</param>
 /// <returns>A newly constructed Test</returns>
 private Test BuildTestCase(MethodInfo method, TestSuite suite)
 {
     return(testBuilder.CanBuildFrom(method, suite)
         ? testBuilder.BuildFrom(method, suite)
         : null);
 }