Beispiel #1
0
        public void TestPostImmediately0()
        {
            List <String> result = new List <String>();

            notifications = new NotificationCenter(new TimerManager());
            notifications.PostImmediately(this, "name", result);

            Check(result);
        }
Beispiel #2
0
        public void TestPostImmediately3()
        {
            List <String> result = new List <String>();

            notifications = new NotificationCenter(new TimerManager());
            notifications.Register("name1", Callback1);
            notifications.Register("name1", Callback2);
            notifications.Register("name1", Callback3);

            notifications.PostImmediately(this, "name2", result);

            Check(result);
        }
Beispiel #3
0
        public void TestPostImmediately6()
        {
            List <String> result = new List <String>();

            Dummy dummy = new Dummy();

            notifications = new NotificationCenter(new TimerManager());
            notifications.Register("name", Callback1);
            notifications.Register("name", dummy.Callback1);
            notifications.Register("name", Callback2);
            notifications.Register("name", dummy.Callback2);
            notifications.Register("name", Callback3);
            notifications.Register("name", dummy.Callback3);

            notifications.PostImmediately(this, "name", result);

            Check(result, "Callback1", "Dummy1", "Callback2", "Dummy2", "Callback3", "Dummy3");
            notifications.UnregisterAll(this);

            notifications.PostImmediately(this, "name", result);
            Check(result, "Dummy1", "Dummy2", "Dummy3");
        }
        public void TestPostImmediately7()
        {
            List<String> result = new List<String>();

            notifications = new NotificationCenter(new TimerManager());
            notifications.Register("name", Callback4);
            notifications.Register("name", Callback1);
            notifications.Register("name", Callback5);
            notifications.Register("name", Callback3);

            notifications.PostImmediately(this, "name", result);

            Check(result, "Callback4", "Callback5");
        }
        public void TestPostImmediately6()
        {
            List<String> result = new List<String>();

            Dummy dummy = new Dummy();

            notifications = new NotificationCenter(new TimerManager());
            notifications.Register("name", Callback1);
            notifications.Register("name", dummy.Callback1);
            notifications.Register("name", Callback2);
            notifications.Register("name", dummy.Callback2);
            notifications.Register("name", Callback3);
            notifications.Register("name", dummy.Callback3);

            notifications.PostImmediately(this, "name", result);

            Check(result, "Callback1", "Dummy1", "Callback2", "Dummy2", "Callback3", "Dummy3");
            notifications.UnregisterAll(this);

            notifications.PostImmediately(this, "name", result);
            Check(result, "Dummy1", "Dummy2", "Dummy3");
        }
        public void TestPostImmediately0()
        {
            List<String> result = new List<String>();

            notifications = new NotificationCenter(new TimerManager());
            notifications.PostImmediately(this, "name", result);

            Check(result);
        }