mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-04 23:47:59 +01:00
Add unit test
This commit is contained in:
parent
ff7c4c108f
commit
68500bf0d0
@ -0,0 +1,19 @@
|
||||
package net.minestom.server.instance;
|
||||
|
||||
import net.minestom.server.instance.block.Block;
|
||||
import net.minestom.testing.Env;
|
||||
import net.minestom.testing.EnvTest;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
|
||||
|
||||
@EnvTest
|
||||
public class BlockPlaceTest {
|
||||
|
||||
@Test
|
||||
void testPlacementOutOfLimit(Env env) {
|
||||
Instance instance = env.createFlatInstance();
|
||||
assertDoesNotThrow(() -> instance.setBlock(0, instance.getDimensionType().getMaxY() + 1, 0, Block.STONE));
|
||||
assertDoesNotThrow(() -> instance.setBlock(0, instance.getDimensionType().getMinY() - 1, 0, Block.STONE));
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user