/// <summary>
        /// Returns a new question generator.
        /// </summary>
        private IQuestionGenerator GetQuestionGenerator(
            Question question,
            ICodeRunnerService codeRunnerService = null)
        {
            var javaModel = GetJavaModel();

            var codeGenFactory = GetMockCodeGenerationFactory
                                 (
                question,
                javaModel
                                 );

            var questionModelFactory = GetMockQuestionModelFactory
                                       (
                javaModel
                                       );

            var questionGenerator = new QuestionGenerator
                                    (
                codeGenFactory.Object,
                questionModelFactory.Object,
                codeRunnerService
                                    );

            return(questionGenerator);
        }
		/// <summary>
		/// Constructor.
		/// </summary>
		public QuestionGenerator(
			IJavaCodeGenerationFactory javaCodeGenerationFactory,
			IQuestionModelFactory questionModelFactory,
			ICodeRunnerService codeRunnerService)
		{
			_javaCodeGenerationFactory = javaCodeGenerationFactory;
			_questionModelFactory = questionModelFactory;
			_codeRunnerService = codeRunnerService;
		}
Beispiel #3
0
 /// <summary>
 /// Constructor.
 /// </summary>
 public QuestionGenerator(
     IJavaCodeGenerationFactory javaCodeGenerationFactory,
     IQuestionModelFactory questionModelFactory,
     ICodeRunnerService codeRunnerService)
 {
     _javaCodeGenerationFactory = javaCodeGenerationFactory;
     _questionModelFactory      = questionModelFactory;
     _codeRunnerService         = codeRunnerService;
 }
 /// <summary>
 /// Constructor.
 /// </summary>
 public ProgramQuestionGrader(ProgramQuestion question, ICodeRunnerService codeRunnerService)
     : base(question, codeRunnerService)
 {
 }
 /// <summary>
 /// Constructor.
 /// </summary>
 public ClassQuestionGrader(ClassQuestion question, ICodeRunnerService codeRunnerService)
     : base(question, codeRunnerService)
 {
 }
 /// <summary>
 /// Constructor.
 /// </summary>
 protected CodeQuestionGrader(TQuestion question, ICodeRunnerService codeRunnerService)
     : base(question)
 {
     CodeRunnerService = codeRunnerService;
 }
		/// <summary>
		/// Returns a new question generator.
		/// </summary>
		private IQuestionGenerator GetQuestionGenerator(
			Question question,
			ICodeRunnerService codeRunnerService = null)
		{
			var javaModel = GetJavaModel();

			var codeGenFactory = GetMockCodeGenerationFactory
			(
				question,
				javaModel
			);

			var questionModelFactory = GetMockQuestionModelFactory
			(
				javaModel
			);

			var questionGenerator = new QuestionGenerator
			(
				codeGenFactory.Object,
				questionModelFactory.Object,
				codeRunnerService
			);

			return questionGenerator;
		}
 /// <summary>
 /// Constructor.
 /// </summary>
 public MethodQuestionGrader(MethodQuestion question, ICodeRunnerService codeRunnerService)
     : base(question, codeRunnerService)
 {
 }
 /// <summary>
 /// Constructor.
 /// </summary>
 public CodeJobController(ICodeRunnerService codeRunnerService)
 {
     _codeRunnerService = codeRunnerService;
 }
		/// <summary>
		/// Constructor.
		/// </summary>
		public CodeJobController(ICodeRunnerService codeRunnerService)
		{
			_codeRunnerService = codeRunnerService;
		}
Beispiel #11
0
 /// <summary>
 /// Constructor.
 /// </summary>
 public QuestionGraderFactory(ICodeRunnerService codeRunnerService)
 {
     _codeRunnerService = codeRunnerService;
 }