コード例 #1
0
 public void Test_that_PrintConnect_Iscalled_when_DoorOpen_equals_true()
 {
     _uutS.HandleDoorEvent(_door, new EventArgDoorOpen {
         DoorOpen = true
     });
     _display.Received(1).PrintConnectDevice();
 }
コード例 #2
0
        public void HandleDoorEvent_DoorOpened_Available_StateIsDoorOpen()
        {
            // Arrange
            _uut._state = StationControl.LadeskabState.Available;
            DoorEventArgs evt = Substitute.For <DoorEventArgs>();

            evt.DoorOpened = true;
            // Act
            _uut.HandleDoorEvent(new object(), evt);
            // Assert
            Assert.That(_uut._state == StationControl.LadeskabState.DoorOpen);
        }