当前位置: 首页>>代码示例>>C#>>正文


C# ITestCommand.StartStep方法代码示例

本文整理汇总了C#中ITestCommand.StartStep方法的典型用法代码示例。如果您正苦于以下问题:C# ITestCommand.StartStep方法的具体用法?C# ITestCommand.StartStep怎么用?C# ITestCommand.StartStep使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ITestCommand的用法示例。


在下文中一共展示了ITestCommand.StartStep方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RunTestCommands

        private static bool RunTestCommands(ITestCommand testCommand, XunitTestClassCommand testClassCommand,
            IEnumerable<XunitTestCommand> xunitTestCommands, TestStep parentTestStep, bool isPrimary)
        {
            bool passed = true;
            foreach (XunitTestCommand xunitTestCommand in xunitTestCommands)
            {
                TestStep testStep = new TestStep(testCommand.Test, parentTestStep,
                    testCommand.Test.Name, testCommand.Test.CodeElement, isPrimary);
                testStep.IsDynamic = !isPrimary;

                string displayName = xunitTestCommand.DisplayName;
                if (displayName != null)
                    testStep.Name = StripTypeNamePrefixFromDisplayName(testCommand.Test.CodeElement, displayName);

                ITestContext testContext = testCommand.StartStep(testStep);
                passed &= RunTestCommandAndFinishStep(testContext, testClassCommand, xunitTestCommand);
            }

            return passed;
        }
开发者ID:dougrathbone,项目名称:mbunit-v3,代码行数:20,代码来源:XunitTestController.cs

示例2: PublishOutcomeFromInvisibleTest

        private static TestResult PublishOutcomeFromInvisibleTest(ITestCommand testCommand, Model.Tree.TestStep testStep, TestOutcome outcome)
        {
            switch (outcome.Status)
            {
                case TestStatus.Skipped:
                case TestStatus.Passed:
                    // Either nothing interesting happened or the test was silently skipped during Before/After.
                    return new TestResult(TestOutcome.Passed);

                case TestStatus.Failed:
                case TestStatus.Inconclusive:
                default:
                    // Something bad happened during Before/After that prevented the test from running.
                    ITestContext context = testCommand.StartStep(testStep);
                    context.LogWriter.Failures.Write("The test did not run.  Consult the parent test log for more details.");
                    return context.FinishStep(outcome, null);
            }
        }
开发者ID:dougrathbone,项目名称:mbunit-v3,代码行数:18,代码来源:PatternTestExecutor.cs

示例3: SafeStartCommandStep

 private static ITestContext SafeStartCommandStep(ITestContext parentTestContext, ITestCommand testCommand, TestStep testStep)
 {
     using (TestContextTrackerAccessor.Instance.EnterContext(parentTestContext))
         return testCommand.StartStep(testStep);
 }
开发者ID:dougrathbone,项目名称:mbunit-v3,代码行数:5,代码来源:MSTestRunner.cs


注:本文中的ITestCommand.StartStep方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。