Ejemplo n.º 1
0
        public MuTestOptions Build()
        {
            var muTestOptions = new MuTestOptions
            {
                TestSolution             = GetOption(TestSolution.Value(), CliOptions.TestSolution),
                SourceClass              = GetOption(SourceClass.Value(), CliOptions.SourceClass),
                SourceHeader             = GetOption(SourceHeader.Value(), CliOptions.SourceHeader),
                TestProject              = GetOption(TestProject.Value(), CliOptions.TestProject),
                TestClass                = GetOption(TestClass.Value(), CliOptions.TestClass),
                EnableDiagnostics        = GetOption(Diagnostics.Value(), CliOptions.EnableDiagnostics),
                ConcurrentTestRunners    = GetOption(Parallel.Value(), CliOptions.Parallel),
                MutantsPerLine           = GetOption(MutantsPerLine.Value(), CliOptions.MutantsPerLine),
                SurvivedThreshold        = GetOption(SurvivedThreshold.Value(), CliOptions.SurvivedThreshold),
                KilledThreshold          = GetOption(KilledThreshold.Value(), CliOptions.KilledThreshold),
                InIsolation              = GetOption(InIsolation.Value(), CliOptions.InIsolation),
                DisableBuildOptimization = GetOption(DisableBuildOptimization.Value(), CliOptions.DisableBuildOptimization),
                IncludeBuildEvents       = GetOption(IncludeBuildEvents.Value(), CliOptions.IncludeBuildEvents),
                OutputPath               = GetOption(OutputPath.Value(), CliOptions.OutputPath),
                Configuration            = GetOption(Configuration.Value(), CliOptions.BuildConfiguration),
                Platform      = GetOption(Platform.Value(), CliOptions.Platform),
                SpecificLines = GetOption(SpecificLines.Value(), CliOptions.SpecificLineRange)
            };

            muTestOptions.ValidateOptions();
            return(muTestOptions);
        }
Ejemplo n.º 2
0
        public MuTestOptions Build()
        {
            var muTestOptions = new MuTestOptions
            {
                SourceProjectParameter        = GetOption(SourceProject.Value(), CliOptions.SourceProject),
                SourceProjectLibraryParameter = GetOption(SourceLib.Value(), CliOptions.SourceLib),
                SourceClassParameter          = GetOption(SourceClass.Value(), CliOptions.SourceClass),
                TestProjectParameter          = GetOption(TestProject.Value(), CliOptions.TestProject),
                TestProjectLibraryParameter   = GetOption(TestLib.Value(), CliOptions.TestLib),
                TestClassParameter            = GetOption(TestClass.Value(), CliOptions.TestClass),
                ExecuteAllTests               = GetOption(ExecuteAllTests.Value(), CliOptions.ExecuteAllTests),
                SkipTestProjectBuild          = GetOption(SkipTestProjectBuild.Value(), CliOptions.SkipTestProjectBuild),
                IncludePartialClasses         = GetOption(IncludePartialClasses.Value(), CliOptions.IncludePartialClasses),
                AnalyzeExternalCoveredClasses = GetOption(AnalyzeExternalCoveredClasses.Value(), CliOptions.AnalyzeExternalCoveredClasses),
                IncludeNestedClasses          = GetOption(IncludeNestedClasses.Value(), CliOptions.IncludeNestedClasses),
                UseClassFilter              = GetOption(UseClassFilter.Value(), CliOptions.UseClassFilter),
                X64TargetPlatform           = GetOption(X64.Value(), CliOptions.X64TargetPlatform),
                BuildInReleaseModeParameter = GetOption(ReleaseMode.Value(), CliOptions.BuildInReleaseMode),
                EnableDiagnostics           = GetOption(Diagnostics.Value(), CliOptions.EnableDiagnostics),
                OptimizeTestProject         = GetOption(OptimizeTestProject.Value(), CliOptions.OptimizeTestProject),
                ConcurrentTestRunners       = GetOption(Parallel.Value(), CliOptions.Parallel),
                SurvivedThreshold           = GetOption(SurvivedThreshold.Value(), CliOptions.SurvivedThreshold),
                KilledThreshold             = GetOption(KilledThreshold.Value(), CliOptions.KilledThreshold),
                OutputPathParameter         = GetOption(OutputPath.Value(), CliOptions.OutputPath),
                NoCoverage             = GetOption(NoCoverage.Value(), CliOptions.NoCoverage),
                RegEx                  = GetOption(RegEx.Value(), CliOptions.Regex),
                Specific               = GetOption(Specific.Value(), CliOptions.Specific),
                ClassName              = GetOption(ClassName.Value(), CliOptions.ClassName),
                ProcessWholeProject    = GetOption(ProcessWholeProject.Value(), CliOptions.ProcessWholeProject),
                TestExecutionThreshold = GetOption(FindTestTime.Value(), CliOptions.TestExecutionThreshold),
                MutantsPerLine         = GetOption(MutantsPerLine.Value(), CliOptions.MutantsPerLine)
            };

            muTestOptions
            .MultipleSourceClasses
            .AddRange(GetOption(MultipleSourceClasses.Value(), CliOptions.MultipleSourceClasses).Distinct());
            muTestOptions
            .MultipleTestClasses
            .AddRange(GetOption(MultipleTestClasses.Value(), CliOptions.MultipleTestClasses).Distinct());

            muTestOptions.ValidateOptions();
            return(muTestOptions);
        }