mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-12-26 11:07:39 +01:00
Renamed TestBSkyBlock to TestBentoBox
This commit is contained in:
parent
75e5d29934
commit
e930510243
@ -1,4 +1,4 @@
|
|||||||
package bskyblock;
|
package world.bentobox.bentobox;
|
||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
import static org.junit.Assert.assertFalse;
|
import static org.junit.Assert.assertFalse;
|
||||||
@ -68,7 +68,7 @@ import world.bentobox.bentobox.util.Util;
|
|||||||
|
|
||||||
@RunWith(PowerMockRunner.class)
|
@RunWith(PowerMockRunner.class)
|
||||||
@PrepareForTest({ BentoBox.class, Flags.class, Util.class, Bukkit.class})
|
@PrepareForTest({ BentoBox.class, Flags.class, Util.class, Bukkit.class})
|
||||||
public class TestBSkyBlock {
|
public class TestBentoBox {
|
||||||
private static final UUID MEMBER_UUID = UUID.randomUUID();
|
private static final UUID MEMBER_UUID = UUID.randomUUID();
|
||||||
private static final UUID OWNER_UUID = UUID.randomUUID();
|
private static final UUID OWNER_UUID = UUID.randomUUID();
|
||||||
private static final UUID VISITOR_UUID = UUID.randomUUID();
|
private static final UUID VISITOR_UUID = UUID.randomUUID();
|
||||||
@ -93,7 +93,7 @@ public class TestBSkyBlock {
|
|||||||
World world = mock(World.class);
|
World world = mock(World.class);
|
||||||
Mockito.when(server.getLogger()).thenReturn(Logger.getAnonymousLogger());
|
Mockito.when(server.getLogger()).thenReturn(Logger.getAnonymousLogger());
|
||||||
Mockito.when(server.getWorld("world")).thenReturn(world);
|
Mockito.when(server.getWorld("world")).thenReturn(world);
|
||||||
Mockito.when(server.getVersion()).thenReturn("BSB_Mocking");
|
Mockito.when(server.getVersion()).thenReturn("BentoBox_Mocking");
|
||||||
|
|
||||||
PluginManager pluginManager = mock(PluginManager.class);
|
PluginManager pluginManager = mock(PluginManager.class);
|
||||||
when(server.getPluginManager()).thenReturn(pluginManager);
|
when(server.getPluginManager()).thenReturn(pluginManager);
|
||||||
@ -175,7 +175,6 @@ public class TestBSkyBlock {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testIslandEvent() {
|
public void testIslandEvent() {
|
||||||
|
|
||||||
// Test island events
|
// Test island events
|
||||||
IslandBaseEvent event = TeamEvent.builder()
|
IslandBaseEvent event = TeamEvent.builder()
|
||||||
//.island(getIslands().getIsland(playerUUID))
|
//.island(getIslands().getIsland(playerUUID))
|
||||||
@ -368,7 +367,7 @@ public class TestBSkyBlock {
|
|||||||
|
|
||||||
// Protection tests
|
// Protection tests
|
||||||
@Test
|
@Test
|
||||||
public void TestProtection() {
|
public void testProtection() {
|
||||||
User owner = User.getInstance(playerUUID);
|
User owner = User.getInstance(playerUUID);
|
||||||
Island island = new Island();
|
Island island = new Island();
|
||||||
island.setOwner(playerUUID);
|
island.setOwner(playerUUID);
|
||||||
@ -466,7 +465,7 @@ public class TestBSkyBlock {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void TestEventProtection() {
|
public void testEventProtection() {
|
||||||
// Test events
|
// Test events
|
||||||
|
|
||||||
FlagListener fl = new FlagListener(plugin);
|
FlagListener fl = new FlagListener(plugin);
|
||||||
@ -486,7 +485,7 @@ public class TestBSkyBlock {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void TestDefaultFlags() {
|
public void testDefaultFlags() {
|
||||||
// Check all the default flags
|
// Check all the default flags
|
||||||
FlagsManager fm = new FlagsManager(plugin);
|
FlagsManager fm = new FlagsManager(plugin);
|
||||||
Collection<Flag> defaultFlags = Flags.values();
|
Collection<Flag> defaultFlags = Flags.values();
|
||||||
@ -500,7 +499,7 @@ public class TestBSkyBlock {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void TestCustomFlags() {
|
public void testCustomFlags() {
|
||||||
// Custom
|
// Custom
|
||||||
FlagListener fl = new FlagListener(plugin);
|
FlagListener fl = new FlagListener(plugin);
|
||||||
Flag customFlag = new FlagBuilder().id("CUSTOM_FLAG").icon(Material.DIAMOND).listener(fl).build();
|
Flag customFlag = new FlagBuilder().id("CUSTOM_FLAG").icon(Material.DIAMOND).listener(fl).build();
|
Loading…
Reference in New Issue
Block a user