예제 #1
0
        public void SubscribeUnsubscribeAsyncTest()
        {
            AGSEvent <MockEventArgs> ev = new AGSEvent <MockEventArgs> ();

            ev.SubscribeToAsync(onEventAsync);
            ev.UnsubscribeToAsync(onEventAsync);
            Assert.AreEqual(0, ev.SubscribersCount);
        }
예제 #2
0
        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);
        }
예제 #3
0
		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);
		}
예제 #4
0
		public void SubscribeUnsubscribeAsyncTest()
		{
			AGSEvent<MockEventArgs> ev = new AGSEvent<MockEventArgs> ();
			ev.SubscribeToAsync(onEventAsync);
			ev.UnsubscribeToAsync(onEventAsync);
			Assert.AreEqual(0, ev.SubscribersCount);
		}