Esempio n. 1
0
        /// <summary>
        /// Gets the stub competition.
        /// </summary>
        /// <param name="includeCorrectAnswers">if set to <c>true</c> [include correct answers].</param>
        /// <returns>
        /// A stub competition pre-programmed with expectated state.
        /// </returns>
        public static Competition StubCompetition(bool includeCorrectAnswers)
        {
            var competition = new Competition();

            competition.ClosingDate = new DateTime(2012, 11, 1);
            competition.Question    = "Who is Luke Skywalker's Father?";
            competition.PossibleAnswers.Add(CompetitionAnswer.A, "Darth Vader", isCorrectAnswer: true);
            competition.PossibleAnswers.Add(CompetitionAnswer.B, "Obi Wan Kenobi");
            competition.PossibleAnswers.Add(CompetitionAnswer.C, "George Lucas");
            competition.PossibleAnswers.Add(CompetitionAnswer.D, "Walt Disney");
            competition.CompetitionKey = "WINPRIZE";
            competition.CreatedBy      = new User();

            foreach (var item in StubEntrants(includeCorrectAnswers))
            {
                competition.AddEntrant(item);
            }

            return(competition);
        }