Exemplo n.º 1
0
        public void Handle(CreateGameCommand command)
        {
            var gameId = GameId.NewGameId(command.GameId);

            eventStore.Add(gameId, Domain.Game.addQuestion(SingleAnswerQuestion.create("What is my favorite color?", new[] { "Red", "Green", "Blue" })));
            eventStore.Add(gameId, Domain.Game.addQuestion(SingleAnswerQuestion.create("Which is my favorite animal?", new[] { "Dog", "Cat", "Alligator", "Snail" })));
            eventStore.Add(gameId, Domain.Game.addQuestion(SingleAnswerQuestion.create("Do I believe the cake is a lie?", new[] { "Yes", "No" })));
            eventStore.Add(gameId, Domain.Game.addQuestion(MultipleAnswerQuestion.create("What are my favorite colors?", new[] { "Red", "Green", "Blue", "Yellow" })));
        }
Exemplo n.º 2
0
        public void FormDetailViewModelTests_RadioButtonValidation_False()
        {
            SingleAnswerQuestion question = new SingleAnswerQuestion {
                Question = "questão",
                Options  = new System.Collections.ObjectModel.ObservableCollection <string> {
                    "opção"
                },
                SelectedOption = -1
            };

            _viewModel.SingleAnswerQuestions.Add(question);
            List <MultipleChoiceAnswer> multipleChoiceAnswers = new List <MultipleChoiceAnswer>();

            Assert.False(_viewModel.RadioButtonValidation(multipleChoiceAnswers));
        }
Exemplo n.º 3
0
 public abstract T Visit(SingleAnswerQuestion state);
Exemplo n.º 4
0
 public override State Visit(SingleAnswerQuestion state)
 {
     return(new States.SingleAnswerQuestion(state.Options.Select(option => new States.SingleAnswerQuestion.Option(option.Id, option.Text))));
 }