Exemplo n.º 1
0
        public void Listener_WasCalled_WhenInvoked()
        {
            // Arrange
            var  uEventDispatcher = new UEventDispatcher();
            bool wasCalled        = false;

            uEventDispatcher.AddEventListener <TestUEvent01>((IUEventData uEventData) =>
            {
                wasCalled = true;
            });

            // Act
            uEventDispatcher.Invoke <TestUEvent01>(new UEventData());

            // Assert
            Assert.That(wasCalled, Is.True);
        }
Exemplo n.º 2
0
 //  Methods   -------------------------------
 public void Invoke <T>(IUEventData uEventData) where T : IUEvent
 {
     _eventDispatcher.Invoke <T>(uEventData);
 }