Remove plugins.gradle and factor into common extension

This commit is contained in:
Gary Tierney
2017-09-16 18:49:06 +01:00
parent d323bcd69c
commit 36282cf81e
104 changed files with 608 additions and 408 deletions
+3
View File
@@ -0,0 +1,3 @@
apolloPlugin {
name = "logout"
}
+1
View File
@@ -0,0 +1 @@
name = "logout"
+5
View File
@@ -0,0 +1,5 @@
val LOGOUT_BUTTON_ID = 2458
on_button(LOGOUT_BUTTON_ID)
.where { widgetId == LOGOUT_BUTTON_ID }
.then { it.logout() }
+19
View File
@@ -0,0 +1,19 @@
import org.apollo.game.message.impl.ButtonMessage
import org.apollo.game.plugin.testing.KotlinPluginTest
import org.junit.Test
import org.mockito.Mockito.times
import org.mockito.Mockito.verify
class LogoutTests : KotlinPluginTest() {
companion object {
const val LOGOUT_BUTTON_ID = 2458
}
@Test fun `The player should be logged out when they click the logout button`() {
player.notify(ButtonMessage(LOGOUT_BUTTON_ID))
verify(player, times(1)).logout()
}
}