private void ReportErrorIfSolutionNotBuildingOrNotPassesTests()
        {
            var solutionCode = ex.CorrectSolutionFile.ContentAsUtf8();
            var submission   = ex.CreateSubmission(ex.CsprojFileName, solutionCode);
            var result       = SandboxRunner.Run(submission, new SandboxRunnerSettings());

            if (!IsCompiledAndExecuted(result))
            {
                ReportSlideError(slide, $"Correct solution file {ex.CorrectSolutionFileName} verdict is not OK. RunResult = {result}");
            }

            if (!ex.IsCorrectRunResult(result))
            {
                ReportSlideError(slide, $"Correct solution file {ex.CorrectSolutionFileName} is not solution. RunResult = {result}. " +
                                 $"ExpectedOutput = {ex.ExpectedOutput.NormalizeEoln()} " +
                                 $"RealOutput = {result.GetOutput().NormalizeEoln()}");
            }
            var buildResult = ex.BuildSolution(solutionCode);

            if (buildResult.HasStyleErrors)
            {
                var errorMessage = string.Join("\n", buildResult.StyleErrors.Select(e => e.GetMessageWithPositions()));
                ReportSlideWarning(slide, $"Correct solution file {ex.CorrectSolutionFileName} has style issues. {errorMessage}");
            }
        }
        private void ReportErrorIfSolutionNotBuildingOrNotPassesTests()
        {
            var solutionCode = ex.CorrectSolutionFile.ContentAsUtf8();
            var submission   = ex.CreateSubmission(ex.CsprojFileName, solutionCode);
            var result       = SandboxRunner.Run(submission, new SandboxRunnerSettings());

            if (VerdictIsNotOk(result))
            {
                ReportSlideError(slide, $"Correct solution file {ex.CorrectSolutionFileName} verdict is not OK. RunResult = {result}");
            }

            if (!IsSolution(result))
            {
                ReportSlideError(slide, $"Correct solution file {ex.CorrectSolutionFileName} is not solution. RunResult = {result}");
            }
            var buildResult = ex.BuildSolution(solutionCode);

            if (buildResult.HasStyleErrors)
            {
                var errorMessage = string.Join("\n", buildResult.StyleErrors.Select(e => e.GetMessageWithPositions()));
                ReportSlideWarning(slide, $"Correct solution file {ex.CorrectSolutionFileName} has style issues. {errorMessage}");
            }
        }