Example #1
0
        public void GetNextReturnsHighRollTurnForEachPlayerOnce(int count)
        {
            var players = CreatePlayers(count);
            var factory = CreateFactory();
            var provider = new TurnProvider(players, factory.Object);

            for (int i = 0; i < count; i++)
            {
                var turn = provider.GetNext();
                Assert.IsAssignableFrom<IHighRollTurn>(turn);
            }
        }
Example #2
0
        public void ExpectForEachPlayer2BuildTurnsAfterHighRollTurn(int count)
        {
            var players = CreatePlayers(count);
            var factory = CreateFactory();
            var provider = new TurnProvider(players, factory.Object);

            for (int i = 0; i < count; i++)
            {
                provider.GetNext();
            }

            for(int i=0; i<count*2; i++)
            {
                var turn = provider.GetNext();
                Assert.IsAssignableFrom<IBuildTurn>(turn);
            }
        }
Example #3
0
        public void ExpectEveryTurnAfterBuildTurnToBeGameTurn(int count)
        {
            var players = CreatePlayers(count);
            var factory = CreateFactory();
            var provider = new TurnProvider(players, factory.Object);

            for (int i = 0; i < count; i++)
            {
                provider.GetNext();
            }

            for (int i = 0; i < count * 2; i++)
            {
                provider.GetNext();
            }

            for(int i =0; i < count*count; i++)
            {
                var turn = provider.GetNext();
                Assert.IsAssignableFrom<IGameTurn>(turn);
            }
        }