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

COVERAGE SUMMARY FOR SOURCE FILE [RemoveHandler2o.java]

nameclass, %method, %block, %line, %
RemoveHandler2o.java100% (1/1)100% (8/8)98%  (47/48)99%  (12.9/13)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class RemoveHandler2o100% (1/1)100% (8/8)98%  (47/48)99%  (12.9/13)
handleWorld (LocalEventBusTests$ObservableStringReference): void 100% (1/1)94%  (15/16)98%  (2.9/3)
RemoveHandler2o (): void 100% (1/1)100% (3/3)100% (1/1)
getEmCounter (): int 100% (1/1)100% (3/3)100% (1/1)
getWorldCounter (): int 100% (1/1)100% (3/3)100% (1/1)
handleEm (LocalEventDispatchContext, LocalEventBusTests$ObservableStringRefer... 100% (1/1)100% (13/13)100% (3/3)
isEmOk (): boolean 100% (1/1)100% (3/3)100% (1/1)
isWorldOk (): boolean 100% (1/1)100% (3/3)100% (1/1)
setExpectedWorld (Object): void 100% (1/1)100% (4/4)100% (2/2)

1package com.hammurapi.eventbus.tests;
2 
3import com.hammurapi.common.Condition;
4import com.hammurapi.eventbus.EventHandlerBase.Mode;
5import com.hammurapi.eventbus.Handler;
6import com.hammurapi.eventbus.local.LocalEventDispatchContext;
7import com.hammurapi.eventbus.tests.LocalEventBusTests.ObservableStringReference;
8 
9public class RemoveHandler2o {
10        
11        private Object expectedWorld;
12        
13        public void setExpectedWorld(Object expectedWorld) {
14                this.expectedWorld = expectedWorld;
15        }
16        
17        private int worldCounter;
18        private boolean worldOk;
19        
20        public int getWorldCounter() {
21                return worldCounter;
22        }
23 
24        public boolean isWorldOk() {
25                return worldOk;
26        }
27 
28        @Handler(value="java(*)://strRef.get().equals(\"World\")", mode=Mode.REMOVE)
29        public void handleWorld(ObservableStringReference strRef) {
30                ++worldCounter;
31                worldOk = expectedWorld == strRef;
32        }
33        
34        private int emCounter;
35        private boolean emOk;
36        
37        public int getEmCounter() {
38                return emCounter;
39        }
40 
41        public boolean isEmOk() {
42                return emOk;
43        }
44 
45        @Handler(mode=Mode.REMOVE)
46        public void handleEm(LocalEventDispatchContext<Object, Integer, Object> context, @Condition("\"!\".equals(strRef.get())") ObservableStringReference strRef) {
47                ++emCounter;
48                emOk = "!".equals(strRef.get());
49        }
50        
51        
52}

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