Search in sources :

Example 1 with SpongeEventManager

use of org.spongepowered.common.event.SpongeEventManager in project SpongeForge by SpongePowered.

the class SpongeModEventManagerTest method init.

@Before
public void init() throws Exception {
    PluginManager manager = Mockito.mock(PluginManager.class);
    this.eventManager = new SpongeEventManager(manager);
    this.plugin = new Object();
    this.container = Mockito.mock(PluginContainer.class);
    Mockito.when(manager.fromInstance(plugin)).thenReturn(Optional.of(this.container));
    this.resetStatics();
}
Also used : PluginManager(org.spongepowered.api.plugin.PluginManager) PluginContainer(org.spongepowered.api.plugin.PluginContainer) SpongeEventManager(org.spongepowered.common.event.SpongeEventManager) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)1 PluginContainer (org.spongepowered.api.plugin.PluginContainer)1 PluginManager (org.spongepowered.api.plugin.PluginManager)1 SpongeEventManager (org.spongepowered.common.event.SpongeEventManager)1