aboutsummaryrefslogtreecommitdiff
path: root/src/test/kotlin
diff options
context:
space:
mode:
authorbush-did-711 <39170869+bush-did-711@users.noreply.github.com>2022-03-26 23:17:00 -1000
committerbush-did-711 <39170869+bush-did-711@users.noreply.github.com>2022-03-26 23:17:00 -1000
commit2a32d5ee4f2eb9e64ffb3d36ed16793dc72c24b2 (patch)
tree6a657d92f5aa112bed14d65132b9c8a6d7e6c96d /src/test/kotlin
downloadeventbus-kotlin-2a32d5ee4f2eb9e64ffb3d36ed16793dc72c24b2.tar.gz
eventbus-kotlin-2a32d5ee4f2eb9e64ffb3d36ed16793dc72c24b2.tar.bz2
eventbus-kotlin-2a32d5ee4f2eb9e64ffb3d36ed16793dc72c24b2.zip
Initial commit
Diffstat (limited to 'src/test/kotlin')
-rw-r--r--src/test/kotlin/Main.kt26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/test/kotlin/Main.kt b/src/test/kotlin/Main.kt
new file mode 100644
index 0000000..0933c97
--- /dev/null
+++ b/src/test/kotlin/Main.kt
@@ -0,0 +1,26 @@
+import me.bush.illnamethislater.*
+
+/**
+ * @author bush
+ * @since 3/13/2022
+ */
+fun main() {
+ EventBus().run {
+
+ subscribe(Subscriber())
+
+ post("Object()")
+
+ register(listener<String> {
+ println("it")
+ })
+ }
+}
+
+class Subscriber {
+// clean up and writr tests
+ @EventListener
+ fun onDeez() = listener(listener = { e: String ->
+ println(e.uppercase())
+ }, receiveCancelled = false, )
+}