Esempio n. 1
0
        public void OnUnconnectedOnConnectionEvent_CalledThroughEvent_RaisesEvent()
        {
            //ARRANGE
            EventArgs args = new EventArgs();

            UsbChargerSubstitute.PhoneUnConnected.ConnectionEvent += (sender, args) => uut.UnConnectedOnConnectionEvent(new object(), args);

            bool eventRaised = false;

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

            //ACT

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

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