private async Task <TestRunResult> RunAsync(ExecutionData executionData, string environmentPath,
                                                    string binariesFolder, ExecutableCode testingCode)
        {
            var testRunEnvironment = Path.Combine(environmentPath, Guid.NewGuid().ToString());

            binariesFolder.CopyFolderTo(testRunEnvironment);

            string inputFilePath = Path.Combine(testRunEnvironment, _configuration.InputFileName);

            File.WriteAllText(inputFilePath, executionData.InputData);

            var executionCommand = testingCode.GetExecutionCommand(testRunEnvironment);

            executionCommand.StdinFilename = _configuration.InputFileName;

            var containerExecutionResult =
                await _executor.ExecuteAsync(executionCommand);

            var outputFile = Path.Combine(testRunEnvironment, _configuration.OutputFileName);

            return(new TestRunResult
            {
                ExecutionResult = containerExecutionResult.Result,
                ExpectedOutput = executionData.OutputData,
                UserOutput = await GetUserOutput(outputFile, containerExecutionResult)
            });
        }
        private Command GetCompilationCommand(ExecutableCode executableCode, string tempFolder)
        {
            if (executableCode is CompilableCode compilableCode)
            {
                return(compilableCode.GetCompilationCommand(tempFolder));
            }

            return(executableCode.GetExecutionCommand(tempFolder));
        }