use of net.runelite.client.RuneLite in project runelite by runelite.
the class PluginManagerTest method before.
@Before
public void before() throws IOException {
RuneLite.setOptions(mock(OptionSet.class));
Injector injector = Guice.createInjector(new RuneLiteModule(), BoundFieldModule.of(this));
RuneLite.setInjector(injector);
runelite = injector.getInstance(RuneLite.class);
// Find plugins we expect to have
pluginClasses = new HashSet<>();
Set<ClassInfo> classes = ClassPath.from(getClass().getClassLoader()).getTopLevelClassesRecursive(PLUGIN_PACKAGE);
for (ClassInfo classInfo : classes) {
Class<?> clazz = classInfo.load();
PluginDescriptor pluginDescriptor = clazz.getAnnotation(PluginDescriptor.class);
if (pluginDescriptor != null) {
pluginClasses.add(clazz);
}
}
}