public static void callback_add_event() { efl.Loop loop = new efl.LoopConcrete(); TestEoEvents listener = new TestEoEvents(); loop.CALLBACK_ADD += listener.callback; Test.Assert(!listener.called); loop.IDLE += listener.another_callback; Test.Assert(listener.called); }
public static void idle_event() { Efl.Loop loop = Efl.App.AppMain; loop.SetName("loop"); TestEoEvents listener = new TestEoEvents(); listener.loop = loop; loop.IdleEvt += listener.callback; Test.Assert(!listener.called); Test.Assert(!listener.correct_sender); Test.AssertEquals("loop", loop.GetName()); loop.Begin(); Test.Assert(listener.called); Test.Assert(listener.correct_sender); Test.AssertEquals("loop_called", loop.GetName()); }