public void DoorOpened_NoIdHasBeenGivenAndCallDoorOpen_AlarmIsRaised()
        {
            _userValidation.ValidateEntryRequest(0).Returns(true);

            _uut.DoorOpened();

            //Assert that
            _alarm.Received(1).RaiseAlarm();
        }
        public void DoorOpenedEventHandlerTest_DoorIsClosed_AlarmIsRaised()
        {
            // Act
            _door.DoorOpenedEvent += Raise.EventWith(new DoorOpenedEventArgs());


            // Assert
            _alarm.Received().SignalAlarm();
        }
        public void DoorOpenedValidState_RaiseAlarmCalled(DoorControlState state, bool RaiseAlarmExpected)
        {
            _state.State = state;
            _UUT.DoorOpened();

            if (RaiseAlarmExpected)
            {
                _alarm.Received(1).RaiseAlarm();
            }
            else
            {
                _alarm.DidNotReceive().RaiseAlarm();
            }
        }
Exemplo n.º 4
0
 public void DoorOpened_RaiseAlarmCalled()
 {
     uut.DoorOpened();
     testAlarm.Received(1).RaiseAlarm();
 }
Exemplo n.º 5
0
 public void Update_entryStateFalseDoorOpenedTrue_RaiseAlarmCalled()
 {
     _door.Opened = true;
     _uut.Update(_door);
     _alarm.Received(1).RaiseAlarm();
 }
 public void RequestEntry_CardDbDeniesEntryRequest_AlarmNotCalled()
 {
     _userValidation.ValidateEntryRequest("TFJ").Returns(false);
     _uut.RequestEntry("TFJ");
     _alarm.Received(0).SoundAlarm();
 }
Exemplo n.º 7
0
 public void DoorBreached_DoorStateIsBreached()
 {
     _uut.DoorOpened();
     _alarm.Received(1).SoundAlarm();
 }
 public void CheckIfAlarmRaised_ExpectedTrue()
 {
     _uut.IsDoorOpen = false;
     _uut.DoorOpen();
     _alarm.Received(1).Equals(true);
 }
Exemplo n.º 9
0
 public void DoorOpen_OpenedWithoutValidation_AlarmRaised()
 {
     _doorControl.DoorOpen();
     _alarmFake.Received(1).RaiseAlarm();
 }
Exemplo n.º 10
0
 public void DoorOpenedTest_DoorOpen_RaiseAlaram()
 {
     _uut.DoorOpened();
     _alarm.Received(1).RaiseAlaram();
 }
Exemplo n.º 11
0
 public void DoorOpened_AccesNotDenied_AlarmIsStarted()
 {
     uut.DoorOpened();
     alarm.Received(1).RaiseAlarm();
 }
 public void Alarm_RaiseAlarm_Called()
 {
     _uut.RaiseAlarm();
     _alarm.Received(1).RaiseAlarm();
 }
Exemplo n.º 13
0
 public void DoorOpen_DoorOpenIsCalled_StateEqualsDoorClosed_RaiseAlarmCalled()
 {
     _uut.DoorOpen();
     alarm.Received(1).RaiseAlarm();
 }