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" }))); }
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)); }
public abstract T Visit(SingleAnswerQuestion state);
public override State Visit(SingleAnswerQuestion state) { return(new States.SingleAnswerQuestion(state.Options.Select(option => new States.SingleAnswerQuestion.Option(option.Id, option.Text)))); }