Exemple #1
0
        public void AddPassenger_DoorsClose_PassengerNotAdded()
        {
            var coach = new Coach();
            var passenger = new Passenger();

            coach.AddPassenger(passenger);

            Assert.AreEqual(0, coach.PassengerCount);
        }
Exemple #2
0
        public void AddPassenger_DoorsOpen_PassengerAdded()
        {
            var coach = new Coach();
            coach.OpenDoors();

            var passenger = new Passenger();

            coach.AddPassenger(passenger);

            Assert.AreEqual(1, coach.PassengerCount);
        }