Example #1
0
 internal void PickPhrase(GamePhrase phrase, TelephoneGameRepository repository)
 {
     _gamePhrase = phrase;
 }
        public void CheckPhraseChosen_Success()
        {
            using (var repository = new TelephoneGameRepository())
            {
                Game game = _game4;

                bool success = GameService.TransitionGameState(game, game.Edges[1], repository);
                Assert.That(success, "Couldn't transition");

                Assert.That(game.Edges[0].GetType() == typeof(CheckPhraseChosen), "This edge is not a CheckPhraseChosen");

                var phrase = new GamePhrase();
                GameService.PickPhraseForGame(phrase, game, repository);
                success = GameService.TransitionGameState(game, game.Edges[0], repository);
                Assert.That(success, "Couldn't transition along CheckPhraseChosen edge");
            }
        }