SPIGOT-7267: Fix EntityType#getTranslationKey() and add unit test
By: Doc <nachito94@msn.com>
This commit is contained in:
@@ -27,4 +27,14 @@ public class EntityTypesTest extends AbstractTestingBase {
|
||||
|
||||
Assert.assertTrue("Unmapped bukkit entities " + allBukkit, allBukkit.isEmpty());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTranslationKey() {
|
||||
for (EntityType entityType : EntityType.values()) {
|
||||
// Currently EntityType#getTranslationKey has a validation for null name then for test skip this and check correct names.
|
||||
if (entityType.getName() != null) {
|
||||
Assert.assertNotNull("Nulllable translation key for " + entityType, entityType.getTranslationKey());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user