public void SetCorrectAnswer(AnswerKeyQuestionAnswer answerKeyQuestionAnswer)
        {
            if (answerKeyQuestionAnswer == null)
            {
                return;
            }

            AssignProperties(answerKeyQuestionAnswer);

            if (ProcessCancelAction(answerKeyQuestionAnswer))
            {
                return;
            }

            SetResult();
        }
        private bool ProcessCancelAction(AnswerKeyQuestionAnswer answerKeyQuestionAnswer)
        {
            switch (answerKeyQuestionAnswer.QuestionAnswerCancelAction)
            {
            case QuestionAnswerCancelAction.CorrectForAll:
                Result = QuestionAnswerResult.Correct;
                return(true);

            case QuestionAnswerCancelAction.EmptyForAll:
                Result = QuestionAnswerResult.Empty;
                return(true);

            default:
                return(false);
            }
        }
 private void AssignProperties(AnswerKeyQuestionAnswer answerKeyQuestionAnswer)
 {
     SubjectId     = answerKeyQuestionAnswer.SubjectId;
     SubjectName   = answerKeyQuestionAnswer.SubjectName;
     CorrectAnswer = answerKeyQuestionAnswer.Answer;
 }