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


C# IConfiguration.AddTestResultFile方法代码示例

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


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

示例1: CaptureConfiguration

        private void CaptureConfiguration(IConfiguration configuration, IFileSystem fileSystem)
        {
            configuration.FeatureFolder = fileSystem.DirectoryInfo.FromDirectoryName(this.FeatureDirectory);
            configuration.OutputFolder = fileSystem.DirectoryInfo.FromDirectoryName(this.OutputDirectory);
            if (!string.IsNullOrEmpty(this.Language))
            {
                configuration.Language = this.Language;
            }

            if (!string.IsNullOrEmpty(this.ResultsFormat))
            {
                configuration.TestResultsFormat = (TestResultsFormat)Enum.Parse(typeof(TestResultsFormat), this.ResultsFormat, true);
            }

            if (!string.IsNullOrEmpty(this.ResultsFile))
            {
                configuration.AddTestResultFile(fileSystem.FileInfo.FromFileName(this.ResultsFile));
            }

            if (!string.IsNullOrEmpty(this.SystemUnderTestName))
            {
                configuration.SystemUnderTestName = this.SystemUnderTestName;
            }

            if (!string.IsNullOrEmpty(this.SystemUnderTestVersion))
            {
                configuration.SystemUnderTestVersion = this.SystemUnderTestVersion;
            }

            if (!string.IsNullOrEmpty(this.DocumentationFormat))
            {
                configuration.DocumentationFormat = (DocumentationFormat)Enum.Parse(typeof(DocumentationFormat), this.DocumentationFormat, true);
            }

            bool shouldEnableExperimentalFeatures;

            if (bool.TryParse(this.IncludeExperimentalFeatures, out shouldEnableExperimentalFeatures))
            {
                if (shouldEnableExperimentalFeatures)
                {
                    configuration.EnableExperimentalFeatures();
                }
            }

            bool shouldEnableComments;

            if (bool.TryParse(this.EnableComments, out shouldEnableComments))
            {
                if (!shouldEnableComments)
                {
                    configuration.DisableComments();
                }
            }
        }
开发者ID:picklesdoc,项目名称:pickles,代码行数:54,代码来源:Pickles.cs

示例2: ParseParameters

        private void ParseParameters(IConfiguration configuration, IFileSystem fileSystem, PathInfo currentFileSystemLocation)
        {
            configuration.FeatureFolder = this.DetermineFeatureFolder(fileSystem, currentFileSystemLocation, this.FeatureDirectory);
            configuration.OutputFolder = this.DetermineFeatureFolder(fileSystem, currentFileSystemLocation, this.OutputDirectory);

            if (!string.IsNullOrEmpty(this.TestResultsFormat))
            {
                configuration.TestResultsFormat =
                    (TestResultsFormat)Enum.Parse(typeof(TestResultsFormat), this.TestResultsFormat, true);
            }

            if (!string.IsNullOrEmpty(this.TestResultsFile))
            {
                configuration.AddTestResultFile(fileSystem.FileInfo.FromFileName(this.TestResultsFile));
            }

            configuration.SystemUnderTestName = this.SystemUnderTestName;
            configuration.SystemUnderTestVersion = this.SystemUnderTestVersion;
            if (!string.IsNullOrEmpty(this.DocumentationFormat))
            {
                configuration.DocumentationFormat = (DocumentationFormat)Enum.Parse(typeof(DocumentationFormat), this.DocumentationFormat, true);
            }

            if (!string.IsNullOrEmpty(this.Language))
            {
                configuration.Language = this.Language;
            }

            if (this.IncludeExperimentalFeatures.IsPresent)
            {
                configuration.EnableExperimentalFeatures();
            }

            if (this.IncludeExperimentalFeatures.IsPresent)
            {
                configuration.EnableExperimentalFeatures();
            }

            bool shouldEnableComments;

            if (bool.TryParse(this.EnableComments, out shouldEnableComments))
            {
                if (!shouldEnableComments)
                {
                    configuration.DisableComments();
                }
            }
        }
开发者ID:picklesdoc,项目名称:pickles,代码行数:48,代码来源:Pickle_Features.cs

示例3: CaptureConfiguration

        private void CaptureConfiguration(IConfiguration configuration, IFileSystem fileSystem)
        {
            configuration.FeatureFolder = fileSystem.DirectoryInfo.FromDirectoryName(this.FeatureDirectory);
            configuration.OutputFolder = fileSystem.DirectoryInfo.FromDirectoryName(this.OutputDirectory);
            if (!string.IsNullOrEmpty(this.Language))
            {
                configuration.Language = this.Language;
            }

            if (!string.IsNullOrEmpty(this.ResultsFormat))
            {
                configuration.TestResultsFormat = (TestResultsFormat)Enum.Parse(typeof(TestResultsFormat), this.ResultsFormat, true);
            }

            if (!string.IsNullOrEmpty(this.ResultsFile))
            {
                configuration.AddTestResultFile(fileSystem.FileInfo.FromFileName(this.ResultsFile));
            }

            if (!string.IsNullOrEmpty(this.SystemUnderTestName))
            {
                configuration.SystemUnderTestName = this.SystemUnderTestName;
            }

            if (!string.IsNullOrEmpty(this.SystemUnderTestVersion))
            {
                configuration.SystemUnderTestVersion = this.SystemUnderTestVersion;
            }

            if (!string.IsNullOrEmpty(this.DocumentationFormat))
            {
                configuration.DocumentationFormat = (DocumentationFormat)Enum.Parse(typeof(DocumentationFormat), this.DocumentationFormat, true);
            }
        }
开发者ID:MikeThomas64,项目名称:pickles,代码行数:34,代码来源:Pickles.cs

示例4: ParseParameters

        private void ParseParameters(IConfiguration configuration, IFileSystem fileSystem, PathInfo currentFileSystemLocation)
        {
            configuration.FeatureFolder = this.DetermineFeatureFolder(fileSystem, currentFileSystemLocation, this.FeatureDirectory);
            configuration.OutputFolder = this.DetermineFeatureFolder(fileSystem, currentFileSystemLocation, this.OutputDirectory);

            if (!string.IsNullOrEmpty(this.TestResultsFormat))
            {
                configuration.TestResultsFormat =
                    (TestResultsFormat)Enum.Parse(typeof(TestResultsFormat), this.TestResultsFormat, true);
            }

            if (!string.IsNullOrEmpty(this.TestResultsFile))
            {
                configuration.AddTestResultFile(fileSystem.FileInfo.FromFileName(this.TestResultsFile));
            }

            configuration.SystemUnderTestName = this.SystemUnderTestName;
            configuration.SystemUnderTestVersion = this.SystemUnderTestVersion;
            if (!string.IsNullOrEmpty(this.DocumentationFormat))
            {
                configuration.DocumentationFormat = (DocumentationFormat)Enum.Parse(typeof(DocumentationFormat), this.DocumentationFormat, true);
            }

            if (!string.IsNullOrEmpty(this.Language))
            {
                configuration.Language = this.Language;
            }
        }
开发者ID:MikeThomas64,项目名称:pickles,代码行数:28,代码来源:Pickle_Features.cs


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