예제 #1
0
        public void QuestionFactory_MapAnswersNull_Return_NullReferenceException()
        {
            QuestionFactory qFactory = new QuestionFactory();

            List <Answer> answerList = qFactory.MapAnswers(null);

            String s = answerList[0].GetAnswer();
        }
예제 #2
0
        public void QuestionFactory_MapAnswers_ReturnValue()
        {
            EHFragenEntities ehfEntitie = new EHFragenEntities();
            QuestionFactory  qFactory   = new QuestionFactory();

            List <Antworten> antworten  = ehfEntitie.Antwortens.Where(x => (x.P_Id == 1)).ToList();
            List <Answer>    answerList = qFactory.MapAnswers(antworten);

            Assert.AreEqual(answerList[0].GetAnswer(), "122");
        }