Beispiel #1
0
        public void OnUnconnectedOnDisconnectionEvent_CalledThroughEvent_RaisesEvent()
        {
            //ARRANGE
            EventArgs args = new EventArgs();

            UsbChargerSubstitute.PhoneUnConnected.DisconnectionEvent += (sender, args) => uut.UnConnectedOnDisconnectionEvent(new object(), args);

            bool eventRaised = false;

            uut.UnConnectedDisconnectionEvent += (o, e) => eventRaised = true;

            //ACT

            UsbChargerSubstitute.PhoneUnConnected.DisconnectionEvent += Raise.EventWith(new object(), args);

            //ASSERT
            Assert.That(eventRaised, Is.True);
        }