Search in sources :

Example 1 with BukkitTriggerReactorCore

use of io.github.wysohn.triggerreactor.bukkit.main.BukkitTriggerReactorCore in project TriggerReactor by wysohn.

the class AbstractTestExecutors method testServer.

@Test
public void testServer() throws Exception {
    BukkitTriggerReactorCore plugin = mock(BukkitTriggerReactorCore.class);
    AbstractJavaPlugin.BungeeCordHelper helper = mock(AbstractJavaPlugin.BungeeCordHelper.class);
    Player player = mock(Player.class);
    when(plugin.getBungeeHelper()).thenReturn(helper);
    new ExecutorTest(engine, "SERVER").addVariable("player", player).addVariable("plugin", plugin).withArgs("someServer").test();
    verify(helper).sendToServer(player, "someServer");
}
Also used : Player(org.bukkit.entity.Player) IPlayer(io.github.wysohn.triggerreactor.core.bridge.entity.IPlayer) BukkitTriggerReactorCore(io.github.wysohn.triggerreactor.bukkit.main.BukkitTriggerReactorCore) AbstractJavaPlugin(io.github.wysohn.triggerreactor.bukkit.main.AbstractJavaPlugin) ExecutorTest(js.ExecutorTest) ExecutorTest(js.ExecutorTest) Test(org.junit.Test) JsTest(js.JsTest)

Aggregations

AbstractJavaPlugin (io.github.wysohn.triggerreactor.bukkit.main.AbstractJavaPlugin)1 BukkitTriggerReactorCore (io.github.wysohn.triggerreactor.bukkit.main.BukkitTriggerReactorCore)1 IPlayer (io.github.wysohn.triggerreactor.core.bridge.entity.IPlayer)1 ExecutorTest (js.ExecutorTest)1 JsTest (js.JsTest)1 Player (org.bukkit.entity.Player)1 Test (org.junit.Test)1