public void RequestEntry_RequestEntryWithValidId_DoorOpened() { _userValidationFake.ValidateEntryRequest(100).Returns(true); _doorControl.RequestEntry(100); _doorFake.Received(1).Open(); }
public void RequestEntry_RequestEntryWithValidId_DoorOpened() { _userValidationFake.ValidateEntryRequestReturnValue = true; //Any id will be valid _doorControl.RequestEntry(100); Assert.That(_doorFake.OpenCalledCount, Is.EqualTo(1)); }