예제 #1
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);
        }