Beispiel #1
0
        GetMergerFromResourcesPlusHandler(string exercisesResourceName, string designsResourceName)
        {
            var erh = new ExerciseResourceHandler(exercisesResourceName);

            return(
                new ExerciseMerger(new ExerciseReader(
                                       erh,
                                       new ExerciseJsonParser()),
                                   new DesignDocReader(
                                       new DesignDocResourceHandler(designsResourceName),
                                       new DesignDocParser())),
                erh);
        }
Beispiel #2
0
        public void Merge_WithTooManyErrors_DoesNotWriteExerciseReport()
        {
            var exerciseResourceHandler
                = new ExerciseResourceHandler(Constants.ExercisesNoObjectivesResource);
            var merger =
                new ExerciseMerger(new ExerciseReader(
                                       exerciseResourceHandler,
                                       new ExerciseJsonParser())
                                   , new DesignDocReader(
                                       new DesignDocResourceHandler(Constants.DesignEmptyResource),
                                       new DesignDocParser()),
                                   maxErrors: 1
                                   );

            var mergeResults = merger.MergeExercisesAndLearningObjectives();

            Assert.Equal(Result.FatalError, mergeResults.Result);
        }