| EMMA Coverage Report (generated Thu Jan 20 11:39:44 EST 2011) |
|---|
| [all classes][com.hammurapi.eventbus.tests] |
| name | class, % | method, % | block, % | line, % |
|---|---|---|---|---|
| PredicateChainingHandler.java | 100% (1/1) | 100% (5/5) | 100% (17/17) | 100% (7/7) |
| name | class, % | method, % | block, % | line, % |
|---|---|---|---|---|
| class PredicateChainingHandler | 100% (1/1) | 100% (5/5) | 100% (17/17) | 100% (7/7) |
| PredicateChainingHandler (): void | 100% (1/1) | 100% (3/3) | 100% (1/1) | |
| handleOne (String): void | 100% (1/1) | 100% (4/4) | 100% (2/2) | |
| handleTwo (String): void | 100% (1/1) | 100% (4/4) | 100% (2/2) | |
| isOneInvoked (): boolean | 100% (1/1) | 100% (3/3) | 100% (1/1) | |
| isTwoInvoked (): boolean | 100% (1/1) | 100% (3/3) | 100% (1/1) |
| 1 | package com.hammurapi.eventbus.tests; |
| 2 | |
| 3 | import com.hammurapi.common.Condition; |
| 4 | import com.hammurapi.eventbus.Handler; |
| 5 | |
| 6 | public class PredicateChainingHandler { |
| 7 | |
| 8 | private boolean oneInvoked; |
| 9 | private boolean twoInvoked; |
| 10 | |
| 11 | @Handler |
| 12 | public void handleOne(@Condition("java(*)://str.length()>10 && str.startsWith(\"Hello\")") String str) { |
| 13 | oneInvoked = true; |
| 14 | } |
| 15 | |
| 16 | @Handler("java(*)://AND(str.length()>10, str.endsWith(\"world!\"))") |
| 17 | public void handleTwo(String str) { |
| 18 | twoInvoked = true; |
| 19 | } |
| 20 | |
| 21 | public boolean isOneInvoked() { |
| 22 | return oneInvoked; |
| 23 | } |
| 24 | |
| 25 | public boolean isTwoInvoked() { |
| 26 | return twoInvoked; |
| 27 | } |
| 28 | |
| 29 | } |
| [all classes][com.hammurapi.eventbus.tests] |
| EMMA 2.0.5312 EclEmma Fix 2 (C) Vladimir Roubtsov |