コード例 #1
0
        /// <summary>
        /// Enumerates the test commands for a given test method in this test class.
        /// </summary>
        /// <param name="testMethod">The method under test</param>
        /// <returns>The test commands for the given test method</returns>
        public IEnumerable <ITestCommand> EnumerateTestCommands(IMethodInfo testMethod)
        {
            string skipReason = MethodUtility.GetSkipReason(testMethod);

            if (skipReason != null)
            {
                yield return(new SkipCommand(testMethod, MethodUtility.GetDisplayName(testMethod), skipReason));
            }
            else
            {
                foreach (ITestCommand command in MethodUtility.GetTestCommands(testMethod))
                {
                    yield return(new FixtureCommand(command, fixtures));
                }
            }
        }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FactCommand"/> class.
 /// </summary>
 /// <param name="method">The test method.</param>
 public FactCommand(IMethodInfo method)
     : base(method, MethodUtility.GetDisplayName(method), MethodUtility.GetTimeoutParameter(method))
 {
 }