Permalink
Browse files

plugin manager test: check plugins don't error when registering with …

…eventbus
  • Loading branch information...
Adam- committed Feb 8, 2019
1 parent d67c83f commit a211e39cfd203daf40f56a0558afe752f8bf3093
@@ -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;
@@ -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)

0 comments on commit a211e39

Please sign in to comment.