public void RequestEntryEntryCallTest_StateDoorClosed(int id, bool granted) { _UUT.RequestEntry(id); if (granted) { _entry.Received(1).NotifyEntryGranted(); _entry.DidNotReceive().NotifyEntryDenied(); } else { _entry.Received(1).NotifyEntryDenied(); _entry.DidNotReceive().NotifyEntryGranted(); } }
public void RequestEntry_CallNotifyEntryGrantedWrongID_MethodNotCalled() { _userValidation.ValidateEntryRequest("WrongID").Returns(false); uut.RequestEntry("WrongID"); _entryNotification.DidNotReceive().NotifyEntryGranted(); }
public void OnDoorOpen_NoForcedEntry_DoNotExpectAlarm() { _fakeDoor.DoorChangedEvent += Raise.EventWith(new object(), new DoorEventArgs() { Forced = false }); _fakeNotification.DidNotReceive().SignalAlarm(); }
public void RequestEntry_GetInvalidID_DeniedNotificationIsSent() { _userValidation.ValidateEntryRequest(0).Returns(false); _uut.RequestEntry(0); //Assert that _entryNotification.DidNotReceive().NotifyEntryGranted(); }
public void RequestEntry_CardDbApprovesEntryRequest_BeeperMakeUnhappyNoiseNotCalled() { _uut.RequestEntry("TFJ"); EntryNotification.DidNotReceive().NotifyEntryDenied(); }
public void RequestEntry_CardDbDeniesEntryRequest_BeeperMakeHappyNoiseNotCalled() { _uut.RequestEntry("TFJ"); EntryNotification.DidNotReceive().NotifyEntryGranted(); }
public void RequestEntry_RequestEntryCalled_IdEqualsTrue_NotifyEntryDeniedIsNotCalled() { userValidation.ValidateEntryRequest(1).Returns(true); _uut.RequestEntry(1); entryNotification.DidNotReceive().NotifyEntryDenied(); }