예제 #1
0
        public void InitializeRoundStateWhileOtherPlayerIsRoundStarter()
        {
            var state   = new RoundState();
            var player1 = new Player
            {
                User = new User
                {
                    Id = 1
                },
                IsRoundStarter = false
            };
            var player2 = new Player
            {
                User = new User
                {
                    Id = 2
                },
                IsRoundStarter = true
            };
            var game = new Game
            {
                Players =
                {
                    player1,
                    player2
                },
                State = state
            };


            var events = state.Initialize(game).ToList();

            Assert.Equal(2, events.Count);
            Assert.False(player1.IsTurn);
            Assert.True(player2.IsTurn);
        }