示例#1
0
 public void Interacted()
 {
     elev.Call(toT);
     if (audioS)
     {
         audioS.Play();
     }
 }
示例#2
0
        public void Call_Elevator_At_5_Floor()
        {
            var elevator = new Elevator(10, 5, 300);

            elevator.Call(5);
            elevator.Move();

            Assert.Equal(5, elevator.CurrentFloor);
            Assert.Equal(0, elevator.NumberOfPeople);
            Assert.Equal(0, elevator.CurrentWeight);
        }
示例#3
0
        public void Bring_One_People_To_4_And_Call_Elevator_At_5_Floor()
        {
            var elevator = new Elevator(10, 5, 300);

            elevator.Add(new People(80), 4);
            elevator.Call(5);
            elevator.Move();

            Assert.Equal(5, elevator.CurrentFloor);
            Assert.Equal(0, elevator.NumberOfPeople);
            Assert.Equal(0, elevator.CurrentWeight);
        }
示例#4
0
 private void CallElevator()
 {
     elevator.Call(currentFloor);
     EnterElevator();
 }