mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-01-15 20:51:37 +01:00
Started working on AddonsManagerTest
This commit is contained in:
parent
c78efb8736
commit
f75de015a2
@ -0,0 +1,39 @@
|
||||
package world.bentobox.bentobox.managers;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.powermock.core.classloader.annotations.PrepareForTest;
|
||||
import org.powermock.modules.junit4.PowerMockRunner;
|
||||
import org.powermock.reflect.Whitebox;
|
||||
import world.bentobox.bentobox.BentoBox;
|
||||
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
@RunWith(PowerMockRunner.class)
|
||||
@PrepareForTest( { BentoBox.class} )
|
||||
public class AddonsManagerTest {
|
||||
|
||||
private static BentoBox plugin;
|
||||
|
||||
@Before
|
||||
public void setup() {
|
||||
// Set up plugin
|
||||
plugin = mock(BentoBox.class);
|
||||
Whitebox.setInternalState(BentoBox.class, "instance", plugin);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testConstructor() {
|
||||
AddonsManager addonsManager = new AddonsManager(plugin);
|
||||
|
||||
assertNotNull(addonsManager.getAddons());
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,6 +1,3 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package world.bentobox.bentobox.managers;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
Loading…
Reference in New Issue
Block a user