Esempio n. 1
0
        public void StationConstructor()
        {
            void Excecute()
            {
                StationTestDummy station = new StationTestDummy(3, null);
            }

            Assert.Throws(typeof(NextStepNullException), Excecute);
        }
Esempio n. 2
0
        public void IsRoomAvailable_IsThereRoomOrNot()
        {
            int             peopleLimit = 1;
            bool            decision    = true;
            List <Traveler> travelers   = new List <Traveler>();

            travelers.Add(new Traveler());
            travelers.Add(new Traveler());
            StationTestDummy station = new StationTestDummy(peopleLimit, new EndStep());

            station.PlayerArrival(travelers[0], decision);
            station.PlayerArrival(travelers[1], decision);
            Assert.AreEqual(station.IsRoomAvailable(), false);
        }
Esempio n. 3
0
        public void PlayerArrival_TravelerAndDecision_UpdatePlayersIn()
        {
            int             peopleLimit = 3;
            bool            decision    = false;
            Traveler        traveler    = new Traveler();
            List <Traveler> travelers   = new List <Traveler>();

            travelers.Add(traveler);
            StationTestDummy station = new StationTestDummy(peopleLimit, new EndStep());

            station.PlayerArrival(traveler, decision);
            Assert.AreEqual(station.PlayersIn, travelers);
            Assert.AreEqual(station.PlayersIn[0].Score, 0);
        }