示例#1
0
        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);
            }
        }
示例#2
0
        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;
            }
        }
示例#3
0
        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();
                }
            }
        }
示例#4
0
        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();
                }
            }
        }
示例#5
0
        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();
                }
            }
        }
示例#6
0
        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);
            }
        }
示例#7
0
        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();
                }
            }
        }
示例#8
0
        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;
            }
        }