Skip to content

Commit

Permalink
plugin manager test: check plugins don't error when registering with …
Browse files Browse the repository at this point in the history
…eventbus
  • Loading branch information
Adam- committed Feb 8, 2019
1 parent d67c83f commit a211e39
Showing 1 changed file with 5 additions and 0 deletions.
Expand Up @@ -47,6 +47,7 @@
import net.runelite.api.Client;
import net.runelite.client.RuneLite;
import net.runelite.client.RuneLiteModule;
import net.runelite.client.eventbus.EventBus;
import net.runelite.client.rs.ClientUpdateCheckMode;
import static org.junit.Assert.assertEquals;
import org.junit.Before;
Expand Down Expand Up @@ -117,6 +118,10 @@ public void testLoadPlugins() throws Exception
pluginManager.loadCorePlugins();
plugins = pluginManager.getPlugins();

// Check that the plugins register with the eventbus without errors
EventBus eventBus = new EventBus();
plugins.forEach(eventBus::register);

expected = pluginClasses.stream()
.map(cl -> (PluginDescriptor) cl.getAnnotation(PluginDescriptor.class))
.filter(Objects::nonNull)
Expand Down

0 comments on commit a211e39

Please sign in to comment.