Beispiel #1
0
       private static void FailOnError(ExerciseSlide slide, SolutionBuildResult solution, string ethalonSolution)
       {
           Assert.Fail($@"Template solution: {ethalonSolution}
 
 source code: {solution.SourceCode}
 
 solution has error in: {slide.Info.Unit.Title} - {slide.Title}
 
 error: {solution.ErrorMessage}");
       }
Beispiel #2
0
        private static void FailOnError(ExerciseSlide slide, SolutionBuildResult solution)
        {
            Assert.Fail(@"Template solution: {0}

source code: {1}

solution has error in: {2} - {3}

error: {4}",
                        slide.Exercise.EthalonSolution, solution.SourceCode, slide.Info.UnitName, slide.Title, solution.ErrorMessage);
        }
        public SolutionBuildResult BuildSolution(string usersExercise)
        {
            var    solution = ExerciseCode.Insert(IndexForInsert, usersExercise + "\r\n");
            string message;

            if ((message = Validator.FindFullSourceError(usersExercise)) != null)
            {
                return(SolutionBuildResult.Error(message, usersExercise));
            }
            if ((message = Validator.FindSyntaxError(solution)) != null)
            {
                return(SolutionBuildResult.Error(message, solution));
            }
            if ((message = Validator.FindValidatorError(usersExercise, solution)) != null)
            {
                return(SolutionBuildResult.StyleIssue(message, solution));
            }
            return(SolutionBuildResult.Success(solution));
        }
Beispiel #4
0
		private void FailOnError(ExerciseSlide slide, SolutionBuildResult solution, string ethalonSolution)
		{
			ReportSlideError(slide, $@"Template solution: {ethalonSolution}
source code: {solution.SourceCode}
error: {solution.ErrorMessage}");
		}
Beispiel #5
0
		private static void FailOnError(ExerciseSlide slide, SolutionBuildResult solution)
		{
			Assert.Fail(@"Template solution: {0}

source code: {1}

solution has error in: {2} - {3}

error: {4}",
				slide.Exercise.EthalonSolution, solution.SourceCode, slide.Info.UnitName, slide.Title, solution.ErrorMessage);
		}
Beispiel #6
0
        private void FailOnError(ExerciseSlide slide, SolutionBuildResult solution, string ethalonSolution)
        {
            ReportSlideError(slide, $@"Template solution: {ethalonSolution}
source code: {solution.SourceCode}
error: {solution.ErrorMessage}");
        }
Beispiel #7
0
		private static void FailOnError(ExerciseSlide slide, SolutionBuildResult solution, string ethalonSolution)
		{
			Assert.Fail($@"Template solution: {ethalonSolution}
  
  source code: {solution.SourceCode}
  
  solution has error in: {slide.Info.UnitName} - {slide.Title}
  
  error: {solution.ErrorMessage}");
		}