Пример #1
0
        public void PhoneLockerStateIsLocked_AfterRfidDetectedAndPhoneConnectedChargingStarted()
        {
            //ARRANGE
            UUT.State = PhoneLockerState.Available;

            fakeChargeControl.Connected = true;

            //ACT
            fakeRfidReader.RFIDDetectedEvent += Raise.EventWith(new RFIDDetectedEventArgs()
            {
                RFID = 0
            });

            PhoneLockerState desiredState = PhoneLockerState.Locked;

            //ASSERT
            Assert.That(UUT.State, Is.EqualTo(desiredState));
        }
Пример #2
0
        public void RfidDetected_PresentsRfidWithMatchingId_StateChangeToAvailable(int rfid)
        {
            //ARRANGE
            UUT.State = PhoneLockerState.Locked;

            fakeChargeControl.Connected = true;
            UUT.oldId = rfid; //gammelt id fra da man låste skabet

            //ACT
            fakeRfidReader.RFIDDetectedEvent += Raise.EventWith(new RFIDDetectedEventArgs()
            {
                RFID = rfid
            });

            PhoneLockerState desiredState = PhoneLockerState.Available;

            //ASSERT
            Assert.That(UUT.State, Is.EqualTo(desiredState));
        }