public void CreateQuestion_Always_WillreturnAFreeTExtQuestion() { QuestionFactory questionFactory = new QuestionFactory(); var question = questionFactory.CreateQuestion("Q1 FT Numele"); Assert.IsInstanceOf(typeof(FreeTextQuestion), question); }
public void CreateQuestion_WillReturnAFreeTextQuestion() { QuestionFactory questionFactory = new QuestionFactory(); var question = questionFactory.CreateQuestion(new StringReader("Q1 Name")); Assert.IsInstanceOf(typeof(FreeTextQuestion), question); }
public void CreateQuestion_WillCreateAQuestion() { IQuestionFactory questionFactory = new QuestionFactory(); var question = questionFactory.CreateQuestion("Q1 FT Numele"); Assert.IsInstanceOf(typeof(IQuestion), question); }
public void CreateQuestion_WithFT_WillCreateAFreeTExtQuestion() { QuestionFactory questionFactory = new QuestionFactory(); var question = questionFactory.CreateQuestion(new StringReader("Q1 Name")); Assert.IsInstanceOf(typeof(FreeTextQuestion), question); Assert.AreEqual("Name", question.Text); }
public void CreateQuestion_WWithFT_WillCreateAFreeTextQuestion() { QuestionFactory questionFactory = new QuestionFactory(); var question = questionFactory.CreateQuestion("Q1 FT Numele"); Assert.IsInstanceOf(typeof(FreeTextQuestion), question); Assert.That("Numele", Is.EqualTo(question.Text)); }
public async Task <bool> NewQuestion(Question.Type type) { question = await QuestionFactory.CreateQuestion(type); if (question.CorrectProfile != null) { return(true); } return(false); }
/// <summary> /// Creates and adds a new Dynamic Question to the area /// based on information about the question. /// </summary> /// <param name="iQuestionID"></param> /// <param name="QuestionText"></param> /// <param name="Type"></param> /// <param name="Sequence"></param> /// <returns></returns> public Question AddQuestion(int iQuestionID, string QuestionText, QuestionTypes Type, int Sequence) { Question question = null; question = QuestionFactory.CreateQuestion(Type, Sequence, iQuestionID, QuestionText, _parent); _questions.Add(question); question.Changed += new System.EventHandler(this.HandleQuestionChange); return(question); }
private void LoadQuestions() { questions.Clear(); for (int i = 0; i < numberOfQuestions; i++) { questions.Add(QuestionFactory.CreateQuestion(level, subjects[PublicRandom.Next(subjects.Length)], goManager.R3D, goManager.CollidableGameObjects, questions)); } goManager.AddObject(questions[questions.Count - 1]); questionHeader.Text = questions[questions.Count - 1].Header; ResetAnswersDisplay(); CreateAnswersSupports(); questions[questions.Count - 1].Player = player; questions[questions.Count - 1].Position = new Vector3(0, 0f, 5); }
public void CreateQuestion_WithFT_WillCreateAFreeTextQuestion() { var question = _questionFactory.CreateQuestion("Q1 FT Numele"); Assert.IsInstanceOf(typeof(FreeTextQuestion), question); }