Event Test cases

class EventComposerClass implements EventComposer{

Context{ setServantType("process"); setNetworkTypes("SocketMulticast"); }

public static void main(String[] args) {

EventTesterClass EventTesterClass = newType EventTesterClass(null);

EventTesterClass.Evt(1000); //won't work - Event port must return a boolean

?? EventTesterClass.Evts // will work {			System.out.println("Event two is triggered"); }

?? EventTesterClass.Evts // won't work - Event port can not used as a method {			System.out.println("Event two is triggered"); }

?? EventTesterClass.Evt(100) // will work {			System.out.println("Event one is triggered"); }

int result = EventTesterClass.Hnd ?? EventTesterClass.Evts; // won't work - here, Handler expects some input System.out.println("Result produced by Event is" + result);

int resulttwo = EventTesterClass.Hnd(1000) ?? EventTesterClass.Evts; // will work System.out.println("Result produced by Event is" + resulttwo);

EventTesterClass.Hnd ?? EventTesterClass.Evt(100); // won't work - handler needs to assign return value to a variable

EventTesterClass.Hnd(1000) ?? EventTesterClass.Evt(100); // won't work - handler needs to assign return value to a variable

} }

Agent implementation file : EventComposer.indus