Rename event and listener methods
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@81 72836036-5685-4462-b002-a69064685172
This commit is contained in:
parent
bcc3f95847
commit
6161c4b1d4
12 changed files with 69 additions and 69 deletions
|
@ -15,15 +15,15 @@ public class Event1Test {
|
|||
testEvent.add(new IListener1<Integer>() {
|
||||
|
||||
@Override
|
||||
public void fire(Integer n) {
|
||||
public void handle(Integer n) {
|
||||
fired += n;
|
||||
|
||||
}
|
||||
});
|
||||
assertEquals(fired, 0);
|
||||
testEvent.fire(10);
|
||||
testEvent.emit(10);
|
||||
assertEquals(fired, 10);
|
||||
testEvent.fire(20);
|
||||
testEvent.emit(20);
|
||||
assertEquals(fired, 30);
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@ public class Event1Test {
|
|||
testEvent.add(new IListener1<Integer>() {
|
||||
|
||||
@Override
|
||||
public void fire(Integer n) {
|
||||
public void handle(Integer n) {
|
||||
fired += n;
|
||||
|
||||
}
|
||||
|
@ -43,14 +43,14 @@ public class Event1Test {
|
|||
testEvent.add(new IListener1<Integer>() {
|
||||
|
||||
@Override
|
||||
public void fire(Integer n) {
|
||||
public void handle(Integer n) {
|
||||
fired2 -= n;
|
||||
|
||||
}
|
||||
});
|
||||
assertEquals(fired, 0);
|
||||
assertEquals(fired2, 0);
|
||||
testEvent.fire(5);
|
||||
testEvent.emit(5);
|
||||
assertEquals(fired, 5);
|
||||
assertEquals(fired2, -5);
|
||||
|
||||
|
@ -63,7 +63,7 @@ public class Event1Test {
|
|||
testEvent.add(new IListener1<Integer>() {
|
||||
|
||||
@Override
|
||||
public void fire(Integer n) {
|
||||
public void handle(Integer n) {
|
||||
fired += n;
|
||||
|
||||
}
|
||||
|
@ -71,13 +71,13 @@ public class Event1Test {
|
|||
IListener1<Integer> rem = new IListener1<Integer>() {
|
||||
|
||||
@Override
|
||||
public void fire(Integer n) {
|
||||
public void handle(Integer n) {
|
||||
fail();
|
||||
}
|
||||
};
|
||||
testEvent.add(rem);
|
||||
testEvent.remove(rem);
|
||||
testEvent.fire(10);
|
||||
testEvent.emit(10);
|
||||
assertEquals(fired, 10);
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue