Пример #1
0
        public void Session_can_be_under_consideration_when_to_few_accepts()
        {
            var session = new GameNight(GameNightState.Suggested, 2);

            var attendee = new User();
            session.AddAttendee(attendee);

            Assert.IsFalse(session.IsScheduled());
        }
Пример #2
0
        public void SessionSuggestion_can_have_attendandts()
        {
            var session = new GameNight(GameNightState.Suggested, 1);

            var attendee = new User();
            session.AddAttendee(attendee);

            Assert.AreEqual(attendee, session.GetAttendees().First());
        }
Пример #3
0
        public void SessionSuggestion_can_have_single_game()
        {
            var session = new GameNight(GameNightState.Suggested, 1);

            var game = new Game("Test Game", 1, 4, 3);

            session.AddSuggestedGame(game);

            Assert.AreEqual(game, session.GetGames().First());
        }
Пример #4
0
        public void User_can_request_play_for_certain_game()
        {
            //This is awful. But I will refactor it soon. Just testing possble solutions to this currently
            var session = new GameNight(GameNightState.Suggested, 2);
            var game = new Game("Robinson Crusoe", 1, 4, 2);

            session.AddSuggestedGame(game);
            session.AddVoteForGame(game);

            Assert.AreEqual(1, session.GetGighestVotedGame().GetNumberOfVotes());
        }