summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/jrummikub/util/Event1Test.java18
-rw-r--r--test/jrummikub/util/Event2Test.java18
-rw-r--r--test/jrummikub/util/EventTest.java18
3 files changed, 27 insertions, 27 deletions
diff --git a/test/jrummikub/util/Event1Test.java b/test/jrummikub/util/Event1Test.java
index f414bf5..3f8839d 100644
--- a/test/jrummikub/util/Event1Test.java
+++ b/test/jrummikub/util/Event1Test.java
@@ -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);
}
}
diff --git a/test/jrummikub/util/Event2Test.java b/test/jrummikub/util/Event2Test.java
index c3d9c2a..6d1958e 100644
--- a/test/jrummikub/util/Event2Test.java
+++ b/test/jrummikub/util/Event2Test.java
@@ -16,17 +16,17 @@ public class Event2Test {
testEvent.add(new IListener2<Integer, Integer>() {
@Override
- public void fire(Integer n, Integer m) {
+ public void handle(Integer n, Integer m) {
fired += n;
fired2 += m;
}
});
assertEquals(fired, 0);
assertEquals(fired2, 0);
- testEvent.fire(10, 5);
+ testEvent.emit(10, 5);
assertEquals(fired, 10);
assertEquals(fired2, 5);
- testEvent.fire(20, 45);
+ testEvent.emit(20, 45);
assertEquals(fired, 30);
assertEquals(fired2, 50);
}
@@ -41,7 +41,7 @@ public class Event2Test {
testEvent.add(new IListener2<Integer, Integer>() {
@Override
- public void fire(Integer n, Integer m) {
+ public void handle(Integer n, Integer m) {
fired += n;
fired2 += m;
}
@@ -49,7 +49,7 @@ public class Event2Test {
testEvent.add(new IListener2<Integer, Integer>() {
@Override
- public void fire(Integer n, Integer m) {
+ public void handle(Integer n, Integer m) {
fired3 -= n;
fired4 -= m;
}
@@ -58,7 +58,7 @@ public class Event2Test {
assertEquals(fired2, 0);
assertEquals(fired3, 0);
assertEquals(fired4, 0);
- testEvent.fire(5, 10);
+ testEvent.emit(5, 10);
assertEquals(fired, 5);
assertEquals(fired2, 10);
assertEquals(fired3, -5);
@@ -73,7 +73,7 @@ public class Event2Test {
testEvent.add(new IListener2<Integer, Integer>() {
@Override
- public void fire(Integer n, Integer m) {
+ public void handle(Integer n, Integer m) {
fired += n;
fired2 += m;
}
@@ -81,7 +81,7 @@ public class Event2Test {
IListener2<Integer, Integer> rem = new IListener2<Integer, Integer>() {
@Override
- public void fire(Integer n, Integer m) {
+ public void handle(Integer n, Integer m) {
fail();
}
};
@@ -89,7 +89,7 @@ public class Event2Test {
assertEquals(fired2, 0);
testEvent.add(rem);
testEvent.remove(rem);
- testEvent.fire(10, 20);
+ testEvent.emit(10, 20);
assertEquals(fired, 10);
assertEquals(fired2, 20);
}
diff --git a/test/jrummikub/util/EventTest.java b/test/jrummikub/util/EventTest.java
index a4fb94f..15bd632 100644
--- a/test/jrummikub/util/EventTest.java
+++ b/test/jrummikub/util/EventTest.java
@@ -13,16 +13,16 @@ public class EventTest {
testEvent.add(new IListener() {
@Override
- public void fire() {
+ public void handle() {
fired = true;
}
});
assertFalse(fired);
- testEvent.fire();
+ testEvent.emit();
assertTrue(fired);
fired = false;
- testEvent.fire();
+ testEvent.emit();
assertTrue(fired);
}
@@ -34,7 +34,7 @@ public class EventTest {
testEvent.add(new IListener() {
@Override
- public void fire() {
+ public void handle() {
fired = true;
}
@@ -42,14 +42,14 @@ public class EventTest {
testEvent.add(new IListener() {
@Override
- public void fire() {
+ public void handle() {
fired2 = true;
}
});
assertFalse(fired);
assertFalse(fired2);
- testEvent.fire();
+ testEvent.emit();
assertTrue(fired);
assertTrue(fired2);
@@ -62,7 +62,7 @@ public class EventTest {
testEvent.add(new IListener() {
@Override
- public void fire() {
+ public void handle() {
fired = true;
}
@@ -70,13 +70,13 @@ public class EventTest {
IListener rem = new IListener() {
@Override
- public void fire() {
+ public void handle() {
fail();
}
};
testEvent.add(rem);
testEvent.remove(rem);
- testEvent.fire();
+ testEvent.emit();
assertTrue(fired);
}