Implement onSessionLogin trigger for commands.yml (#1198)
* Implement onSessionLogin trigger for commands.yml Needs test methods, @ljacqu any advice? * Add simple onSessionLogin test
This commit is contained in:
@@ -92,6 +92,21 @@ public class CommandManagerTest {
|
||||
verifyZeroInteractions(geoIpService);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldExecuteCommandsOnSessionLogin() {
|
||||
// given
|
||||
copyJarFileAsCommandsYml(TEST_FILES_FOLDER + "commands.complete.yml");
|
||||
initManager();
|
||||
|
||||
// when
|
||||
manager.runCommandsOnSessionLogin(player);
|
||||
|
||||
// then
|
||||
verify(bukkitService).dispatchConsoleCommand("msg Bobby Session login!");
|
||||
verifyNoMoreInteractions(bukkitService);
|
||||
verifyZeroInteractions(geoIpService);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldExecuteCommandsOnJoin() {
|
||||
// given
|
||||
|
||||
Reference in New Issue
Block a user