Commits
md_5 authored a317e837eba Merge
1 1 | package org.bukkit.craftbukkit.block; |
2 2 | |
3 3 | import static org.bukkit.support.MatcherAssert.assertThat; |
4 4 | import static org.hamcrest.Matchers.is; |
5 5 | import java.lang.reflect.Field; |
6 6 | import org.bukkit.block.BlockType; |
7 + | import org.bukkit.support.AbstractTestingBase; |
7 8 | import org.junit.jupiter.api.Test; |
8 9 | |
9 - | public class BlockTypeTest { |
10 + | public class BlockTypeTest extends AbstractTestingBase { |
10 11 | |
11 12 | // Ensures all BlockType constants have the correct generics |
12 13 | |
13 14 | public void testBlockDataClasses() throws Exception { |
14 15 | for (Field f : BlockType.class.getDeclaredFields()) { |
15 16 | BlockType type = (BlockType) f.get(null); |
16 17 | |
17 18 | Class<?> expected = type.getBlockDataClass(); |
18 19 | Class<?> actual = type.typed().createBlockData().getClass().getInterfaces()[0]; |
19 20 | assertThat(actual, is(expected)); |