public void SubscribeUnsubscribeAsyncTest() { AGSEvent <MockEventArgs> ev = new AGSEvent <MockEventArgs> (); ev.SubscribeToAsync(onEventAsync); ev.UnsubscribeToAsync(onEventAsync); Assert.AreEqual(0, ev.SubscribersCount); }
public void SubscribeUnsubscribeOnDifferentTargetAsyncTest() { AGSEvent <MockEventArgs> ev = new AGSEvent <MockEventArgs> (); ev.SubscribeToAsync(onEventAsync); EventTests target2 = new EventTests(); ev.UnsubscribeToAsync(target2.onEventAsync); Assert.AreEqual(1, ev.SubscribersCount); }
public void SubscribeUnsubscribeOnDifferentTargetAsyncTest() { AGSEvent<MockEventArgs> ev = new AGSEvent<MockEventArgs> (); ev.SubscribeToAsync(onEventAsync); EventTests target2 = new EventTests (); ev.UnsubscribeToAsync(target2.onEventAsync); Assert.AreEqual(1, ev.SubscribersCount); }
public void SubscribeUnsubscribeAsyncTest() { AGSEvent<MockEventArgs> ev = new AGSEvent<MockEventArgs> (); ev.SubscribeToAsync(onEventAsync); ev.UnsubscribeToAsync(onEventAsync); Assert.AreEqual(0, ev.SubscribersCount); }