Exemple #1
0
        public static IExecutionStrategy CreateExecutionStrategy(ExecutionStrategyType type, int portNumber)
        {
            IExecutionStrategy executionStrategy;
            var tasksService                  = new TasksService();
            var processExecutorFactory        = new ProcessExecutorFactory(tasksService);
            var submissionProcessorIdentifier = portNumber.ToString();

            switch (type)
            {
            case ExecutionStrategyType.CompileExecuteAndCheck:
                executionStrategy = new CompileExecuteAndCheckExecutionStrategy(
                    GetCompilerPath,
                    processExecutorFactory,
                    Settings.MsBuildBaseTimeUsedInMilliseconds,
                    Settings.MsBuildBaseMemoryUsedInBytes);
                break;

            case ExecutionStrategyType.CPlusPlusCompileExecuteAndCheckExecutionStrategy:
                executionStrategy = new CPlusPlusCompileExecuteAndCheckExecutionStrategy(
                    GetCompilerPath,
                    processExecutorFactory,
                    Settings.GPlusPlusBaseTimeUsedInMilliseconds,
                    Settings.GPlusPlusBaseMemoryUsedInBytes);
                break;

            case ExecutionStrategyType.CPlusPlusZipFileExecutionStrategy:
                executionStrategy = new CPlusPlusZipFileExecutionStrategy(
                    GetCompilerPath,
                    processExecutorFactory,
                    Settings.GPlusPlusBaseTimeUsedInMilliseconds,
                    Settings.GPlusPlusBaseMemoryUsedInBytes);
                break;

            case ExecutionStrategyType.DotNetCoreCompileExecuteAndCheck:
                executionStrategy = new DotNetCoreCompileExecuteAndCheckExecutionStrategy(
                    GetCompilerPath,
                    processExecutorFactory,
                    Settings.DotNetCoreRuntimeVersion,
                    Settings.DotNetCscBaseTimeUsedInMilliseconds,
                    Settings.DotNetCscBaseMemoryUsedInBytes);
                break;

            case ExecutionStrategyType.DotNetCoreTestRunner:
                executionStrategy = new DotNetCoreTestRunnerExecutionStrategy(
                    GetCompilerPath,
                    processExecutorFactory,
                    Settings.DotNetCliBaseTimeUsedInMilliseconds,
                    Settings.DotNetCliBaseMemoryUsedInBytes);
                break;

            case ExecutionStrategyType.DotNetCoreUnitTestsExecutionStrategy:
                executionStrategy = new DotNetCoreUnitTestsExecutionStrategy(
                    GetCompilerPath,
                    processExecutorFactory,
                    Settings.DotNetCliBaseTimeUsedInMilliseconds,
                    Settings.DotNetCliBaseMemoryUsedInBytes);
                break;

            case ExecutionStrategyType.CSharpUnitTestsExecutionStrategy:
                executionStrategy = new CSharpUnitTestsExecutionStrategy(
                    GetCompilerPath,
                    processExecutorFactory,
                    Settings.NUnitConsoleRunnerPath,
                    Settings.MsBuildBaseTimeUsedInMilliseconds,
                    Settings.MsBuildBaseMemoryUsedInBytes);
                break;

            case ExecutionStrategyType.CSharpProjectTestsExecutionStrategy:
                executionStrategy = new CSharpProjectTestsExecutionStrategy(
                    GetCompilerPath,
                    processExecutorFactory,
                    Settings.NUnitConsoleRunnerPath,
                    Settings.MsBuildBaseTimeUsedInMilliseconds,
                    Settings.MsBuildBaseMemoryUsedInBytes);
                break;

            case ExecutionStrategyType.CSharpPerformanceProjectTestsExecutionStrategy:
                executionStrategy = new CSharpPerformanceProjectTestsExecutionStrategy(
                    GetCompilerPath,
                    processExecutorFactory,
                    Settings.NUnitConsoleRunnerPath,
                    Settings.DotNetCliBaseTimeUsedInMilliseconds,
                    Settings.DotNetCliBaseMemoryUsedInBytes);
                break;

            case ExecutionStrategyType.CSharpAspProjectTestsExecutionStrategy:
                executionStrategy = new CSharpAspProjectTestsExecutionStrategy(
                    GetCompilerPath,
                    processExecutorFactory,
                    Settings.NUnitConsoleRunnerPath,
                    Settings.MsBuildBaseTimeUsedInMilliseconds,
                    Settings.MsBuildBaseMemoryUsedInBytes);
                break;

            case ExecutionStrategyType.DotNetCoreProjectExecutionStrategy:
                executionStrategy = new DotNetCoreProjectExecutionStrategy(
                    GetCompilerPath,
                    processExecutorFactory,
                    Settings.DotNetCliBaseTimeUsedInMilliseconds,
                    Settings.DotNetCliBaseMemoryUsedInBytes);
                break;

            case ExecutionStrategyType.DotNetCoreProjectTestsExecutionStrategy:
                executionStrategy = new DotNetCoreProjectTestsExecutionStrategy(
                    GetCompilerPath,
                    processExecutorFactory,
                    Settings.DotNetCliBaseTimeUsedInMilliseconds,
                    Settings.DotNetCliBaseMemoryUsedInBytes);
                break;

            case ExecutionStrategyType.RubyExecutionStrategy:
                executionStrategy = new RubyExecutionStrategy(
                    processExecutorFactory,
                    Settings.RubyPath,
                    Settings.RubyBaseTimeUsedInMilliseconds,
                    Settings.RubyBaseMemoryUsedInBytes);
                break;

            case ExecutionStrategyType.JavaPreprocessCompileExecuteAndCheck:
                executionStrategy = new JavaPreprocessCompileExecuteAndCheckExecutionStrategy(
                    GetCompilerPath,
                    processExecutorFactory,
                    Settings.JavaExecutablePath,
                    Settings.JavaLibsPath,
                    Settings.JavaBaseTimeUsedInMilliseconds,
                    Settings.JavaBaseMemoryUsedInBytes,
                    Settings.JavaBaseUpdateTimeOffsetInMilliseconds);
                break;

            case ExecutionStrategyType.JavaZipFileCompileExecuteAndCheck:
                executionStrategy = new JavaZipFileCompileExecuteAndCheckExecutionStrategy(
                    GetCompilerPath,
                    processExecutorFactory,
                    Settings.JavaExecutablePath,
                    Settings.JavaLibsPath,
                    Settings.JavaBaseTimeUsedInMilliseconds,
                    Settings.JavaBaseMemoryUsedInBytes);
                break;

            case ExecutionStrategyType.JavaProjectTestsExecutionStrategy:
                executionStrategy = new JavaProjectTestsExecutionStrategy(
                    GetCompilerPath,
                    processExecutorFactory,
                    Settings.JavaExecutablePath,
                    Settings.JavaLibsPath,
                    Settings.JavaBaseTimeUsedInMilliseconds,
                    Settings.JavaBaseMemoryUsedInBytes);
                break;

            case ExecutionStrategyType.JavaUnitTestsExecutionStrategy:
                executionStrategy = new JavaUnitTestsExecutionStrategy(
                    GetCompilerPath,
                    processExecutorFactory,
                    Settings.JavaExecutablePath,
                    Settings.JavaLibsPath,
                    Settings.JavaBaseTimeUsedInMilliseconds,
                    Settings.JavaBaseMemoryUsedInBytes);
                break;

            case ExecutionStrategyType.JavaSpringAndHibernateProjectExecutionStrategy:
                executionStrategy = new JavaSpringAndHibernateProjectExecutionStrategy(
                    GetCompilerPath,
                    processExecutorFactory,
                    Settings.JavaExecutablePath,
                    Settings.JavaLibsPath,
                    Settings.MavenPath,
                    Settings.JavaBaseTimeUsedInMilliseconds,
                    Settings.JavaBaseMemoryUsedInBytes);
                break;

            case ExecutionStrategyType.NodeJsPreprocessExecuteAndCheck:
                executionStrategy = new NodeJsPreprocessExecuteAndCheckExecutionStrategy(
                    processExecutorFactory,
                    Settings.NodeJsExecutablePath,
                    Settings.UnderscoreModulePath,
                    Settings.NodeJsBaseTimeUsedInMilliseconds * 2,
                    Settings.NodeJsBaseMemoryUsedInBytes);
                break;

            case ExecutionStrategyType.NodeJsPreprocessExecuteAndRunUnitTestsWithMocha:
                executionStrategy = new NodeJsPreprocessExecuteAndRunUnitTestsWithMochaExecutionStrategy(
                    processExecutorFactory,
                    Settings.NodeJsExecutablePath,
                    Settings.MochaModulePath,
                    Settings.ChaiModulePath,
                    Settings.SinonModulePath,
                    Settings.SinonChaiModulePath,
                    Settings.UnderscoreModulePath,
                    Settings.NodeJsBaseTimeUsedInMilliseconds,
                    Settings.NodeJsBaseMemoryUsedInBytes);
                break;

            case ExecutionStrategyType.NodeJsZipPreprocessExecuteAndRunUnitTestsWithDomAndMocha:
                executionStrategy = new NodeJsZipPreprocessExecuteAndRunUnitTestsWithDomAndMochaExecutionStrategy(
                    processExecutorFactory,
                    Settings.NodeJsExecutablePath,
                    Settings.MochaModulePath,
                    Settings.ChaiModulePath,
                    Settings.JsDomModulePath,
                    Settings.JQueryModulePath,
                    Settings.HandlebarsModulePath,
                    Settings.SinonModulePath,
                    Settings.SinonChaiModulePath,
                    Settings.UnderscoreModulePath,
                    Settings.BrowserifyModulePath,
                    Settings.BabelifyModulePath,
                    Settings.Es2015ImportPluginPath,
                    Settings.NodeJsBaseTimeUsedInMilliseconds,
                    Settings.NodeJsBaseMemoryUsedInBytes);
                break;

            case ExecutionStrategyType.NodeJsPreprocessExecuteAndRunJsDomUnitTests:
                executionStrategy = new NodeJsPreprocessExecuteAndRunJsDomUnitTestsExecutionStrategy(
                    processExecutorFactory,
                    Settings.NodeJsExecutablePath,
                    Settings.MochaModulePath,
                    Settings.ChaiModulePath,
                    Settings.JsDomModulePath,
                    Settings.JQueryModulePath,
                    Settings.HandlebarsModulePath,
                    Settings.SinonModulePath,
                    Settings.SinonChaiModulePath,
                    Settings.UnderscoreModulePath,
                    Settings.NodeJsBaseTimeUsedInMilliseconds,
                    Settings.NodeJsBaseMemoryUsedInBytes);
                break;

            case ExecutionStrategyType.NodeJsPreprocessExecuteAndRunCodeAgainstUnitTestsWithMochaExecutionStrategy:
                executionStrategy = new NodeJsPreprocessExecuteAndRunCodeAgainstUnitTestsWithMochaExecutionStrategy(
                    processExecutorFactory,
                    Settings.NodeJsExecutablePath,
                    Settings.MochaModulePath,
                    Settings.ChaiModulePath,
                    Settings.JsDomModulePath,
                    Settings.JQueryModulePath,
                    Settings.HandlebarsModulePath,
                    Settings.SinonModulePath,
                    Settings.SinonChaiModulePath,
                    Settings.UnderscoreModulePath,
                    Settings.NodeJsBaseTimeUsedInMilliseconds,
                    Settings.NodeJsBaseMemoryUsedInBytes);
                break;

            case ExecutionStrategyType.NodeJsExecuteAndRunAsyncJsDomTestsWithReactExecutionStrategy:
                executionStrategy = new NodeJsExecuteAndRunAsyncJsDomTestsWithReactExecutionStrategy(
                    processExecutorFactory,
                    Settings.NodeJsExecutablePath,
                    Settings.MochaModulePath,
                    Settings.ChaiModulePath,
                    Settings.JsDomModulePath,
                    Settings.JQueryModulePath,
                    Settings.HandlebarsModulePath,
                    Settings.SinonJsDomModulePath,
                    Settings.SinonModulePath,
                    Settings.SinonChaiModulePath,
                    Settings.UnderscoreModulePath,
                    Settings.BabelCoreModulePath,
                    Settings.ReactJsxPluginPath,
                    Settings.ReactModulePath,
                    Settings.ReactDomModulePath,
                    Settings.NodeFetchModulePath,
                    Settings.NodeJsBaseTimeUsedInMilliseconds,
                    Settings.NodeJsBaseMemoryUsedInBytes);
                break;

            case ExecutionStrategyType.NodeJsZipExecuteHtmlAndCssStrategy:
                executionStrategy = new NodeJsZipExecuteHtmlAndCssStrategy(
                    processExecutorFactory,
                    Settings.NodeJsExecutablePath,
                    Settings.MochaModulePath,
                    Settings.ChaiModulePath,
                    Settings.SinonModulePath,
                    Settings.SinonChaiModulePath,
                    Settings.JsDomModulePath,
                    Settings.JQueryModulePath,
                    Settings.UnderscoreModulePath,
                    Settings.BootstrapModulePath,
                    Settings.BootstrapCssPath,
                    Settings.NodeJsBaseTimeUsedInMilliseconds,
                    Settings.NodeJsBaseMemoryUsedInBytes);
                break;

            case ExecutionStrategyType.PythonExecuteAndCheck:
                executionStrategy = new PythonExecuteAndCheckExecutionStrategy(
                    processExecutorFactory,
                    Settings.PythonExecutablePath,
                    Settings.PythonBaseTimeUsedInMilliseconds,
                    Settings.PythonBaseMemoryUsedInBytes);
                break;

            case ExecutionStrategyType.PythonUnitTests:
                executionStrategy = new PythonUnitTestsExecutionStrategy(
                    processExecutorFactory,
                    Settings.PythonExecutablePath,
                    Settings.PythonBaseTimeUsedInMilliseconds,
                    Settings.PythonBaseMemoryUsedInBytes);
                break;

            case ExecutionStrategyType.PythonCodeExecuteAgainstUnitTests:
                executionStrategy = new PythonCodeExecuteAgainstUnitTestsExecutionStrategy(
                    processExecutorFactory,
                    Settings.PythonExecutablePath,
                    Settings.PythonBaseTimeUsedInMilliseconds,
                    Settings.PythonBaseMemoryUsedInBytes);
                break;

            case ExecutionStrategyType.PythonProjectTests:
                executionStrategy = new PythonProjectTestsExecutionStrategy(
                    processExecutorFactory,
                    Settings.PythonExecutablePath,
                    Settings.PythonBaseTimeUsedInMilliseconds,
                    Settings.PythonBaseMemoryUsedInBytes);
                break;

            case ExecutionStrategyType.PythonProjectUnitTests:
                executionStrategy = new PythonProjectUnitTestsExecutionStrategy(
                    processExecutorFactory,
                    Settings.PythonExecutablePath,
                    Settings.PythonBaseTimeUsedInMilliseconds,
                    Settings.PythonBaseMemoryUsedInBytes);
                break;

            case ExecutionStrategyType.PhpProjectExecutionStrategy:
                executionStrategy = new PhpProjectExecutionStrategy(
                    processExecutorFactory,
                    Settings.PhpCliExecutablePath,
                    Settings.PhpCliBaseTimeUsedInMilliseconds,
                    Settings.PhpCliBaseMemoryUsedInBytes);
                break;

            case ExecutionStrategyType.PhpProjectWithDbExecutionStrategy:
                executionStrategy = new PhpProjectWithDbExecutionStrategy(
                    processExecutorFactory,
                    Settings.PhpCliExecutablePath,
                    Settings.MySqlSysDbConnectionString,
                    Settings.MySqlRestrictedUserId,
                    Settings.MySqlRestrictedUserPassword,
                    Settings.PhpCliBaseTimeUsedInMilliseconds,
                    Settings.PhpCliBaseMemoryUsedInBytes);
                break;

            case ExecutionStrategyType.PhpCgiExecuteAndCheck:
                executionStrategy = new PhpCgiExecuteAndCheckExecutionStrategy(
                    processExecutorFactory,
                    Settings.PhpCgiExecutablePath,
                    Settings.PhpCgiBaseTimeUsedInMilliseconds,
                    Settings.PhpCgiBaseMemoryUsedInBytes);
                break;

            case ExecutionStrategyType.PhpCliExecuteAndCheck:
                executionStrategy = new PhpCliExecuteAndCheckExecutionStrategy(
                    processExecutorFactory,
                    Settings.PhpCliExecutablePath,
                    Settings.PhpCliBaseTimeUsedInMilliseconds,
                    Settings.PhpCliBaseMemoryUsedInBytes);
                break;

            case ExecutionStrategyType.SolidityCompileDeployAndRunUnitTestsExecutionStrategy:
                executionStrategy = new SolidityCompileDeployAndRunUnitTestsExecutionStrategy(
                    GetCompilerPath,
                    processExecutorFactory,
                    Settings.NodeJsExecutablePath,
                    Settings.GanacheCliNodeExecutablePath,
                    Settings.TruffleCliNodeExecutablePath,
                    portNumber,
                    Settings.SolidityBaseTimeUsedInMilliseconds,
                    Settings.SolidityBaseMemoryUsedInBytes);
                break;

            case ExecutionStrategyType.SqlServerLocalDbPrepareDatabaseAndRunQueries:
                executionStrategy = new SqlServerLocalDbPrepareDatabaseAndRunQueriesExecutionStrategy(
                    Settings.SqlServerLocalDbMasterDbConnectionString,
                    Settings.SqlServerLocalDbRestrictedUserId,
                    Settings.SqlServerLocalDbRestrictedUserPassword);
                break;

            case ExecutionStrategyType.SqlServerLocalDbRunQueriesAndCheckDatabase:
                executionStrategy = new SqlServerLocalDbRunQueriesAndCheckDatabaseExecutionStrategy(
                    Settings.SqlServerLocalDbMasterDbConnectionString,
                    Settings.SqlServerLocalDbRestrictedUserId,
                    Settings.SqlServerLocalDbRestrictedUserPassword);
                break;

            case ExecutionStrategyType.SqlServerLocalDbRunSkeletonRunQueriesAndCheckDatabase:
                executionStrategy = new SqlServerLocalDbRunSkeletonRunQueriesAndCheckDatabaseExecutionStrategy(
                    Settings.SqlServerLocalDbMasterDbConnectionString,
                    Settings.SqlServerLocalDbRestrictedUserId,
                    Settings.SqlServerLocalDbRestrictedUserPassword);
                break;

            case ExecutionStrategyType.SqlServerSingleDatabasePrepareDatabaseAndRunQueries:
                executionStrategy = new SqlServerSingleDatabasePrepareDatabaseAndRunQueriesExecutionStrategy(
                    Settings.SqlServerLocalDbMasterDbConnectionString,
                    Settings.SqlServerLocalDbRestrictedUserId,
                    Settings.SqlServerLocalDbRestrictedUserPassword,
                    submissionProcessorIdentifier);
                break;

            case ExecutionStrategyType.SqlServerSingleDatabaseRunQueriesAndCheckDatabase:
                executionStrategy = new SqlServerSingleDatabaseRunQueriesAndCheckDatabaseExecutionStrategy(
                    Settings.SqlServerLocalDbMasterDbConnectionString,
                    Settings.SqlServerLocalDbRestrictedUserId,
                    Settings.SqlServerLocalDbRestrictedUserPassword,
                    submissionProcessorIdentifier);
                break;

            case ExecutionStrategyType.SqlServerSingleDatabaseRunSkeletonRunQueriesAndCheckDatabase:
                executionStrategy = new SqlServerSingleDatabaseRunSkeletonRunQueriesAndCheckDatabaseExecutionStrategy(
                    Settings.SqlServerLocalDbMasterDbConnectionString,
                    Settings.SqlServerLocalDbRestrictedUserId,
                    Settings.SqlServerLocalDbRestrictedUserPassword,
                    submissionProcessorIdentifier);
                break;

            case ExecutionStrategyType.MySqlPrepareDatabaseAndRunQueries:
                executionStrategy = new MySqlPrepareDatabaseAndRunQueriesExecutionStrategy(
                    Settings.MySqlSysDbConnectionString,
                    Settings.MySqlRestrictedUserId,
                    Settings.MySqlRestrictedUserPassword);
                break;

            case ExecutionStrategyType.MySqlRunQueriesAndCheckDatabase:
                executionStrategy = new MySqlRunQueriesAndCheckDatabaseExecutionStrategy(
                    Settings.MySqlSysDbConnectionString,
                    Settings.MySqlRestrictedUserId,
                    Settings.MySqlRestrictedUserPassword);
                break;

            case ExecutionStrategyType.MySqlRunSkeletonRunQueriesAndCheckDatabase:
                executionStrategy = new MySqlRunSkeletonRunQueriesAndCheckDatabaseExecutionStrategy(
                    Settings.MySqlSysDbConnectionString,
                    Settings.MySqlRestrictedUserId,
                    Settings.MySqlRestrictedUserPassword);
                break;

            case ExecutionStrategyType.DoNothing:
                executionStrategy = new DoNothingExecutionStrategy();
                break;

            case ExecutionStrategyType.RemoteExecution:
                executionStrategy = new RemoteExecutionStrategy();
                break;

            case ExecutionStrategyType.CheckOnly:
                executionStrategy = new CheckOnlyExecutionStrategy(processExecutorFactory, 0, 0);
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }

            return(executionStrategy);
        }
Exemple #2
0
        private IExecutionStrategy CreateExecutionStrategy(ExecutionStrategyType type)
        {
            IExecutionStrategy executionStrategy;

            switch (type)
            {
            case ExecutionStrategyType.CompileExecuteAndCheck:
                executionStrategy = new CompileExecuteAndCheckExecutionStrategy(GetCompilerPath);
                break;

            case ExecutionStrategyType.CPlusPlusCompileExecuteAndCheckExecutionStrategy:
                executionStrategy = new CPlusPlusCompileExecuteAndCheckExecutionStrategy(GetCompilerPath);
                break;

            case ExecutionStrategyType.CPlusPlusZipFileExecutionStrategy:
                executionStrategy = new CPlusPlusZipFileExecutionStrategy(GetCompilerPath);
                break;

            case ExecutionStrategyType.DotNetCoreTestRunner:
                executionStrategy = new DotNetCoreTestRunnerExecutionStrategy(GetCompilerPath);
                break;

            case ExecutionStrategyType.CSharpUnitTestsExecutionStrategy:
                executionStrategy = new CSharpUnitTestsExecutionStrategy(Settings.NUnitConsoleRunnerPath, GetCompilerPath);
                break;

            case ExecutionStrategyType.CSharpProjectTestsExecutionStrategy:
                executionStrategy = new CSharpProjectTestsExecutionStrategy(Settings.NUnitConsoleRunnerPath, GetCompilerPath);
                break;

            case ExecutionStrategyType.CSharpPerformanceProjectTestsExecutionStrategy:
                executionStrategy = new CSharpPerformanceProjectTestsExecutionStrategy(Settings.NUnitConsoleRunnerPath, GetCompilerPath);
                break;

            case ExecutionStrategyType.CSharpAspProjectTestsExecutionStrategy:
                executionStrategy = new CSharpAspProjectTestsExecutionStrategy(Settings.NUnitConsoleRunnerPath, GetCompilerPath);
                break;

            case ExecutionStrategyType.DotNetCoreProjectExecutionStrategy:
                executionStrategy = new DotNetCoreProjectExecutionStrategy(GetCompilerPath);
                break;

            case ExecutionStrategyType.DotNetCoreProjectTestsExecutionStrategy:
                executionStrategy = new DotNetCoreProjectTestsExecutionStrategy(GetCompilerPath);
                break;

            case ExecutionStrategyType.RubyExecutionStrategy:
                executionStrategy = new RubyExecutionStrategy(Settings.RubyPath);
                break;

            case ExecutionStrategyType.JavaPreprocessCompileExecuteAndCheck:
                executionStrategy = new JavaPreprocessCompileExecuteAndCheckExecutionStrategy(
                    Settings.JavaExecutablePath,
                    GetCompilerPath);
                break;

            case ExecutionStrategyType.JavaZipFileCompileExecuteAndCheck:
                executionStrategy = new JavaZipFileCompileExecuteAndCheckExecutionStrategy(
                    Settings.JavaExecutablePath,
                    GetCompilerPath);
                break;

            case ExecutionStrategyType.JavaProjectTestsExecutionStrategy:
                executionStrategy = new JavaProjectTestsExecutionStrategy(
                    Settings.JavaExecutablePath,
                    GetCompilerPath,
                    Settings.JavaLibsPath);
                break;

            case ExecutionStrategyType.JavaUnitTestsExecutionStrategy:
                executionStrategy = new JavaUnitTestsExecutionStrategy(
                    Settings.JavaExecutablePath,
                    GetCompilerPath,
                    Settings.JavaLibsPath);
                break;

            case ExecutionStrategyType.JavaSpringAndHibernateProjectExecutionStrategy:
                executionStrategy = new JavaSpringAndHibernateProjectExecutionStrategy(
                    Settings.JavaExecutablePath,
                    GetCompilerPath,
                    Settings.JavaLibsPath,
                    Settings.MavenPath);
                break;

            case ExecutionStrategyType.NodeJsPreprocessExecuteAndCheck:
                executionStrategy = new NodeJsPreprocessExecuteAndCheckExecutionStrategy(
                    Settings.NodeJsExecutablePath,
                    Settings.UnderscoreModulePath,
                    Settings.NodeJsBaseTimeUsedInMilliseconds * 2,
                    Settings.NodeJsBaseMemoryUsedInBytes);
                break;

            case ExecutionStrategyType.NodeJsPreprocessExecuteAndRunUnitTestsWithMocha:
                executionStrategy = new NodeJsPreprocessExecuteAndRunUnitTestsWithMochaExecutionStrategy(
                    Settings.NodeJsExecutablePath,
                    Settings.MochaModulePath,
                    Settings.ChaiModulePath,
                    Settings.SinonModulePath,
                    Settings.SinonChaiModulePath,
                    Settings.UnderscoreModulePath,
                    Settings.NodeJsBaseTimeUsedInMilliseconds,
                    Settings.NodeJsBaseMemoryUsedInBytes);
                break;

            case ExecutionStrategyType.NodeJsZipPreprocessExecuteAndRunUnitTestsWithDomAndMocha:
                executionStrategy = new NodeJsZipPreprocessExecuteAndRunUnitTestsWithDomAndMochaExecutionStrategy(
                    Settings.NodeJsExecutablePath,
                    Settings.MochaModulePath,
                    Settings.ChaiModulePath,
                    Settings.JsDomModulePath,
                    Settings.JQueryModulePath,
                    Settings.HandlebarsModulePath,
                    Settings.SinonModulePath,
                    Settings.SinonChaiModulePath,
                    Settings.UnderscoreModulePath,
                    Settings.BrowserifyModulePath,
                    Settings.BabelifyModulePath,
                    Settings.Es2015ImportPluginPath,
                    Settings.NodeJsBaseTimeUsedInMilliseconds,
                    Settings.NodeJsBaseMemoryUsedInBytes);
                break;

            case ExecutionStrategyType.NodeJsPreprocessExecuteAndRunJsDomUnitTests:
                executionStrategy = new NodeJsPreprocessExecuteAndRunJsDomUnitTestsExecutionStrategy(
                    Settings.NodeJsExecutablePath,
                    Settings.MochaModulePath,
                    Settings.ChaiModulePath,
                    Settings.JsDomModulePath,
                    Settings.JQueryModulePath,
                    Settings.HandlebarsModulePath,
                    Settings.SinonModulePath,
                    Settings.SinonChaiModulePath,
                    Settings.UnderscoreModulePath,
                    Settings.NodeJsBaseTimeUsedInMilliseconds,
                    Settings.NodeJsBaseMemoryUsedInBytes);
                break;

            case ExecutionStrategyType.NodeJsPreprocessExecuteAndRunCodeAgainstUnitTestsWithMochaExecutionStrategy:
                executionStrategy = new NodeJsPreprocessExecuteAndRunCodeAgainstUnitTestsWithMochaExecutionStrategy(
                    Settings.NodeJsExecutablePath,
                    Settings.MochaModulePath,
                    Settings.ChaiModulePath,
                    Settings.JsDomModulePath,
                    Settings.JQueryModulePath,
                    Settings.HandlebarsModulePath,
                    Settings.SinonModulePath,
                    Settings.SinonChaiModulePath,
                    Settings.UnderscoreModulePath,
                    Settings.NodeJsBaseTimeUsedInMilliseconds,
                    Settings.NodeJsBaseMemoryUsedInBytes);
                break;

            case ExecutionStrategyType.NodeJsExecuteAndRunAsyncJsDomTestsWithReactExecutionStrategy:
                executionStrategy = new NodeJsExecuteAndRunAsyncJsDomTestsWithReactExecutionStrategy(
                    Settings.NodeJsExecutablePath,
                    Settings.MochaModulePath,
                    Settings.ChaiModulePath,
                    Settings.JsDomModulePath,
                    Settings.JQueryModulePath,
                    Settings.HandlebarsModulePath,
                    Settings.SinonJsDomModulePath,
                    Settings.SinonModulePath,
                    Settings.SinonChaiModulePath,
                    Settings.UnderscoreModulePath,
                    Settings.BabelCoreModulePath,
                    Settings.ReactJsxPluginPath,
                    Settings.ReactModulePath,
                    Settings.ReactDomModulePath,
                    Settings.NodeJsBaseTimeUsedInMilliseconds,
                    Settings.NodeJsBaseMemoryUsedInBytes);
                break;

            case ExecutionStrategyType.NodeJsZipExecuteHtmlAndCssStrategy:
                executionStrategy = new NodeJsZipExecuteHtmlAndCssStrategy(
                    Settings.NodeJsExecutablePath,
                    Settings.MochaModulePath,
                    Settings.ChaiModulePath,
                    Settings.SinonModulePath,
                    Settings.SinonChaiModulePath,
                    Settings.JsDomModulePath,
                    Settings.JQueryModulePath,
                    Settings.UnderscoreModulePath,
                    Settings.BootstrapModulePath,
                    Settings.BootstrapCssPath,
                    Settings.NodeJsBaseTimeUsedInMilliseconds,
                    Settings.NodeJsBaseMemoryUsedInBytes);
                break;

            case ExecutionStrategyType.PythonExecuteAndCheck:
                executionStrategy = new PythonExecuteAndCheckExecutionStrategy(Settings.PythonExecutablePath);
                break;

            case ExecutionStrategyType.PhpProjectExecutionStrategy:
                executionStrategy = new PhpProjectExecutionStrategy(Settings.PhpCliExecutablePath);
                break;

            case ExecutionStrategyType.PhpProjectWithDbExecutionStrategy:
                executionStrategy = new PhpProjectWithDbExecutionStrategy(
                    Settings.PhpCliExecutablePath,
                    Settings.MySqlSysDbConnectionString,
                    Settings.MySqlRestrictedUserId,
                    Settings.MySqlRestrictedUserPassword);
                break;

            case ExecutionStrategyType.PhpCgiExecuteAndCheck:
                executionStrategy = new PhpCgiExecuteAndCheckExecutionStrategy(Settings.PhpCgiExecutablePath);
                break;

            case ExecutionStrategyType.PhpCliExecuteAndCheck:
                executionStrategy = new PhpCliExecuteAndCheckExecutionStrategy(Settings.PhpCliExecutablePath);
                break;

            case ExecutionStrategyType.SqlServerLocalDbPrepareDatabaseAndRunQueries:
                executionStrategy = new SqlServerLocalDbPrepareDatabaseAndRunQueriesExecutionStrategy(
                    Settings.SqlServerLocalDbMasterDbConnectionString,
                    Settings.SqlServerLocalDbRestrictedUserId,
                    Settings.SqlServerLocalDbRestrictedUserPassword);
                break;

            case ExecutionStrategyType.SqlServerLocalDbRunQueriesAndCheckDatabase:
                executionStrategy = new SqlServerLocalDbRunQueriesAndCheckDatabaseExecutionStrategy(
                    Settings.SqlServerLocalDbMasterDbConnectionString,
                    Settings.SqlServerLocalDbRestrictedUserId,
                    Settings.SqlServerLocalDbRestrictedUserPassword);
                break;

            case ExecutionStrategyType.SqlServerLocalDbRunSkeletonRunQueriesAndCheckDatabase:
                executionStrategy = new SqlServerLocalDbRunSkeletonRunQueriesAndCheckDatabaseExecutionStrategy(
                    Settings.SqlServerLocalDbMasterDbConnectionString,
                    Settings.SqlServerLocalDbRestrictedUserId,
                    Settings.SqlServerLocalDbRestrictedUserPassword);
                break;

            case ExecutionStrategyType.MySqlPrepareDatabaseAndRunQueries:
                executionStrategy = new MySqlPrepareDatabaseAndRunQueriesExecutionStrategy(
                    Settings.MySqlSysDbConnectionString,
                    Settings.MySqlRestrictedUserId,
                    Settings.MySqlRestrictedUserPassword);
                break;

            case ExecutionStrategyType.MySqlRunQueriesAndCheckDatabase:
                executionStrategy = new MySqlRunQueriesAndCheckDatabaseExecutionStrategy(
                    Settings.MySqlSysDbConnectionString,
                    Settings.MySqlRestrictedUserId,
                    Settings.MySqlRestrictedUserPassword);
                break;

            case ExecutionStrategyType.MySqlRunSkeletonRunQueriesAndCheckDatabase:
                executionStrategy = new MySqlRunSkeletonRunQueriesAndCheckDatabaseExecutionStrategy(
                    Settings.MySqlSysDbConnectionString,
                    Settings.MySqlRestrictedUserId,
                    Settings.MySqlRestrictedUserPassword);
                break;

            case ExecutionStrategyType.DoNothing:
                executionStrategy = new DoNothingExecutionStrategy();
                break;

            case ExecutionStrategyType.RemoteExecution:
                executionStrategy = new RemoteExecutionStrategy();
                break;

            case ExecutionStrategyType.CheckOnly:
                executionStrategy = new CheckOnlyExecutionStrategy();
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }

            return(executionStrategy);
        }