EMMA Coverage Report (generated Thu Jan 20 11:39:44 EST 2011)
[all classes][com.hammurapi.eventbus.tests]

COVERAGE SUMMARY FOR SOURCE FILE [JoinHandler.java]

nameclass, %method, %block, %line, %
JoinHandler.java100% (1/1)100% (7/7)99%  (76/77)100% (12/12)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class JoinHandler100% (1/1)100% (7/7)99%  (76/77)100% (12/12)
join (LocalEventDispatchJoinContext, String, String, int): void 100% (1/1)98%  (48/49)99%  (4/4)
JoinHandler (): void 100% (1/1)100% (3/3)100% (1/1)
getHelloCounter (): int 100% (1/1)100% (3/3)100% (1/1)
getJoinCounter (): int 100% (1/1)100% (3/3)100% (1/1)
handleHello (String): String 100% (1/1)100% (13/13)100% (3/3)
isHelloOk (): boolean 100% (1/1)100% (3/3)100% (1/1)
isJoinOk (): boolean 100% (1/1)100% (3/3)100% (1/1)

1package com.hammurapi.eventbus.tests;
2 
3import com.hammurapi.common.Condition;
4import com.hammurapi.eventbus.Handler;
5import com.hammurapi.eventbus.EventHandlerBase.Mode;
6import com.hammurapi.eventbus.local.LocalEventDispatchJoinContext;
7 
8public class JoinHandler {
9        
10        private int helloCounter;
11        private boolean helloOk;
12        
13        public int getHelloCounter() {
14                return helloCounter;
15        }
16 
17        public boolean isHelloOk() {
18                return helloOk;
19        }
20        
21        private int joinCounter;
22        private boolean joinOk;        
23        
24        public boolean isJoinOk() {
25                return joinOk;
26        }
27        
28        public int getJoinCounter() {
29                return joinCounter;
30        }
31 
32        @Handler("java(str)://str.equals(\"Hello\")")
33        public String handleHello(String str) {
34                ++helloCounter;
35                helloOk = "Hello".equals(str);
36                return "World";
37        }
38        
39        @Handler({
40                        "java(,world,)://world.equals(\"World\")",
41                        "java(hello,world,i)://AND(i+((int) 'A')> (int) hello.charAt(0),i+((int) 'A')< (int) world.charAt(0))"
42                })
43        public void join(
44                        LocalEventDispatchJoinContext<Object, Integer, Object> context, 
45                        @Condition("\"Hello\".equals(hello)") String hello, 
46                        String world, 
47                        int i) {
48                ++joinCounter;
49                joinOk = "Hello".equals(hello) && "World".equals(world) && i>'H'-'A' && i<'W'-'A' && Mode.POST.equals(context.getMode());
50                
51                context.post(hello+" "+world+" "+i);
52        }
53}

[all classes][com.hammurapi.eventbus.tests]
EMMA 2.0.5312 EclEmma Fix 2 (C) Vladimir Roubtsov