Skip to content

Commit

Permalink
Clean up test
Browse files Browse the repository at this point in the history
  • Loading branch information
tastybento committed Nov 9, 2024
1 parent d9b24cf commit 6220262
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public class ChunkGeneratorWorldTest {
@Mock
private World world;
private final Random random = new Random();
@SuppressWarnings("deprecation")
@Mock
private BiomeGrid biomeGrid;
private Settings settings;
Expand All @@ -58,6 +59,7 @@ public class ChunkGeneratorWorldTest {
/**
* @throws java.lang.Exception
*/
@SuppressWarnings("deprecation")
@Before
public void setUp() throws Exception {
ServerMocks.newServer();
Expand All @@ -67,7 +69,6 @@ public void setUp() throws Exception {
Server server = mock(Server.class);
when(server.createChunkData(any())).thenReturn(data);
when(Bukkit.getServer()).thenReturn(server);
@SuppressWarnings("deprecation")
UnsafeValues unsafe = mock(UnsafeValues.class);
when(Bukkit.getUnsafe()).thenReturn(unsafe);

Expand All @@ -85,13 +86,14 @@ public void setUp() throws Exception {
* @throws java.lang.Exception
*/
@After
public void tearDown() throws Exception {
public void tearDown() {
ServerMocks.unsetBukkitServer();
}

/**
* Test method for {@link world.bentobox.bskyblock.generators.ChunkGeneratorWorld#generateChunkData(org.bukkit.World, java.util.Random, int, int, org.bukkit.generator.ChunkGenerator.BiomeGrid)}.
*/
@SuppressWarnings("deprecation")
@Test
public void testGenerateChunkDataWorldRandomIntIntBiomeGridOverworldVoid() {
ChunkData cd = cg.generateChunkData(world, random, 0 , 0 , biomeGrid);
Expand All @@ -105,6 +107,7 @@ public void testGenerateChunkDataWorldRandomIntIntBiomeGridOverworldVoid() {
/**
* Test method for {@link world.bentobox.bskyblock.generators.ChunkGeneratorWorld#generateChunkData(org.bukkit.World, java.util.Random, int, int, org.bukkit.generator.ChunkGenerator.BiomeGrid)}.
*/
@SuppressWarnings("deprecation")
@Test
public void testGenerateChunkDataWorldRandomIntIntBiomeGridOverworldSea() {
// Set sea height
Expand All @@ -120,6 +123,7 @@ public void testGenerateChunkDataWorldRandomIntIntBiomeGridOverworldSea() {
/**
* Test method for {@link world.bentobox.bskyblock.generators.ChunkGeneratorWorld#generateChunkData(org.bukkit.World, java.util.Random, int, int, org.bukkit.generator.ChunkGenerator.BiomeGrid)}.
*/
@SuppressWarnings("deprecation")
@Test
public void testGenerateChunkDataWorldRandomIntIntBiomeGridEnd() {
when(world.getEnvironment()).thenReturn(World.Environment.THE_END);
Expand All @@ -135,6 +139,7 @@ public void testGenerateChunkDataWorldRandomIntIntBiomeGridEnd() {
/**
* Test method for {@link world.bentobox.bskyblock.generators.ChunkGeneratorWorld#generateChunkData(org.bukkit.World, java.util.Random, int, int, org.bukkit.generator.ChunkGenerator.BiomeGrid)}.
*/
@SuppressWarnings("deprecation")
@Test
public void testGenerateChunkDataWorldRandomIntIntBiomeGridNetherWithRoof() {
when(world.getEnvironment()).thenReturn(World.Environment.NETHER);
Expand All @@ -150,6 +155,7 @@ public void testGenerateChunkDataWorldRandomIntIntBiomeGridNetherWithRoof() {
/**
* Test method for {@link world.bentobox.bskyblock.generators.ChunkGeneratorWorld#generateChunkData(org.bukkit.World, java.util.Random, int, int, org.bukkit.generator.ChunkGenerator.BiomeGrid)}.
*/
@SuppressWarnings("deprecation")
@Test
public void testGenerateChunkDataWorldRandomIntIntBiomeGridNetherNoRoof() {
settings.setNetherRoof(false);
Expand Down

0 comments on commit 6220262

Please sign in to comment.