Esempio n. 1
0
 private void TurnKeysTogether()
 {
     _sut.Tick();
     _time.AddMilliseconds(1);
     _sut.KeyOnEvent(KeySwitch.KeyA);
     _sut.Tick();
     _time.AddMilliseconds(1);
     _sut.KeyOnEvent(KeySwitch.KeyB);
     _sut.Tick();
 }
        public void Turn_A_then_B_after_300_msec_does_nothing()
        {
            _sut.KeyOn(KeySwitch.KeyA);
            _time.AddMilliseconds(300);
            _sut.KeyOn(KeySwitch.KeyB);

            Assert.IsFalse(_sut.AreBothOff);
            Assert.IsTrue(_sut.AreBothOn);
            Assert.IsFalse(_sut.SwitchedSimultaneously);
        }