aboutsummaryrefslogtreecommitdiff
path: root/src/test/java
diff options
context:
space:
mode:
authortherealbush <therealbush@users.noreply.github.com>2022-04-14 00:31:47 -0700
committertherealbush <therealbush@users.noreply.github.com>2022-04-14 00:31:47 -0700
commit33665d28f5aeb16b40f832b1a2bd4d81656b74fa (patch)
tree0d6e8302cf5176639b65e2d6d10a94b9d4657aed /src/test/java
parentb49065b50edd48d0f335e17bcf6868dc2f916ad5 (diff)
downloadeventbus-kotlin-33665d28f5aeb16b40f832b1a2bd4d81656b74fa.tar.gz
eventbus-kotlin-33665d28f5aeb16b40f832b1a2bd4d81656b74fa.tar.bz2
eventbus-kotlin-33665d28f5aeb16b40f832b1a2bd4d81656b74fa.zip
format
Diffstat (limited to 'src/test/java')
-rw-r--r--src/test/java/JavaTest.java34
1 files changed, 16 insertions, 18 deletions
diff --git a/src/test/java/JavaTest.java b/src/test/java/JavaTest.java
index 0b942b6..8518315 100644
--- a/src/test/java/JavaTest.java
+++ b/src/test/java/JavaTest.java
@@ -1,14 +1,14 @@
+import me.bush.illnamethislater.EventBus;
import me.bush.illnamethislater.Listener;
import org.apache.logging.log4j.Level;
+import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.core.config.Configurator;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestInstance;
import org.junit.jupiter.api.TestInstance.Lifecycle;
-import me.bush.illnamethislater.EventBus;
-import org.apache.logging.log4j.LogManager;
-import org.junit.jupiter.api.Test;
import static me.bush.illnamethislater.ListenerKt.listener;
@@ -21,8 +21,20 @@ import static me.bush.illnamethislater.ListenerKt.listener;
*/
@TestInstance(Lifecycle.PER_CLASS)
public class JavaTest {
- private EventBus eventBus;
+ public static Listener someStaticListenerField = listener(SimpleEvent.class, event -> {
+ event.setCount(event.getCount() + 1);
+ });
private final Logger logger = LogManager.getLogger();
+ public Listener someInstanceListenerField = listener(SimpleEvent.class, event -> {
+ event.setCount(event.getCount() + 1);
+ });
+ private EventBus eventBus;
+
+ public static Listener someStaticListenerMethod() {
+ return listener(SimpleEvent.class, event -> {
+ event.setCount(event.getCount() + 1);
+ });
+ }
@BeforeAll
public void setup() {
@@ -40,23 +52,9 @@ public class JavaTest {
Assertions.assertEquals(event.getCount(), 4);
}
- public Listener someInstanceListenerField = listener(SimpleEvent.class, event -> {
- event.setCount(event.getCount() + 1);
- });
-
public Listener someInstanceListenerMethod() {
return listener(SimpleEvent.class, event -> {
event.setCount(event.getCount() + 1);
});
}
-
- public static Listener someStaticListenerMethod() {
- return listener(SimpleEvent.class, event -> {
- event.setCount(event.getCount() + 1);
- });
- }
-
- public static Listener someStaticListenerField = listener(SimpleEvent.class, event -> {
- event.setCount(event.getCount() + 1);
- });
}