@Before public void setUp() throws Exception { creator = new TestInstanceCreator(); assertTrue(creator.setUp()); mockServer = creator.getServer(); mockCommandSender = creator.getCommandSender(); // Pull a core instance from the server. Plugin plugin = mockServer.getPluginManager().getPlugin("Multiverse-Inventories"); // Make sure Core is not null assertNotNull(plugin); inventories = (MultiverseInventories) plugin; Field field = MultiverseInventories.class.getDeclaredField("inventoriesListener"); field.setAccessible(true); listener = (InventoriesListener) field.get(inventories); // Make sure Core is enabled assertTrue(inventories.isEnabled()); }
@After public void tearDown() throws Exception { creator.tearDown(); }