Skip to content

Commit

Permalink
fix(velocity): mock executor service maybe
Browse files Browse the repository at this point in the history
  • Loading branch information
bigspeedfpv committed Sep 24, 2024
1 parent 383a259 commit ba8da36
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ class MockedVelocityServer {
}
Mockito.`when`(server.scheduler).thenReturn(scheduler)
Mockito.`when`(server.pluginManager).thenReturn(pluginManager)
Mockito.`when`(pluginManager.isLoaded(Mockito.anyString())).thenReturn(true)

val commandManager = VelocityCommandManager(eventManager, pluginManager)
Mockito.`when`(server.commandManager).thenReturn(commandManager)
Expand All @@ -79,6 +78,9 @@ class MockedVelocityServer {
val suspendingPluginContainer = SuspendingPluginContainer(plugin, server, logger)
suspendingPluginContainer.initialize(plugin.instance.get())

Mockito.`when`(pluginManager.isLoaded(Mockito.anyString())).thenReturn(true)
Mockito.`when`(pluginManager.ensurePluginContainer(Mockito.any())).thenReturn(plugin)

return plugin
}

Expand Down

0 comments on commit ba8da36

Please sign in to comment.