public ActionResult FinishDay(AddChoices addChoices)
        {
            var addChoicesCommand = new AddChoicesCommand(repo);
            var finishDayCommand  = new FinishDayCommand(repo);

            addChoicesCommand.Execute(addChoices);
            var result = finishDayCommand.Execute(addChoices);

            return(Json(result));
        }
Beispiel #2
0
        public void Execute_AddsChoices()
        {
            Game.AddDay();

            var command = new AddChoicesCommand(Repository);
            var choices = new List <Choices>
            {
                new Choices(10, 9, 1),
                new Choices(5, 5, 2),
            };

            command.Execute(
                new AddChoices(
                    Game.Id,
                    choices
                    )
                );

            Assert.AreSame(choices[0], Game.CurrentDay.Choices[0]);
            Assert.AreSame(choices[1], Game.CurrentDay.Choices[1]);
        }