Fixes a collision between the test enchantments
All checks were successful
EpicKnarvik97/Blacksmith/pipeline/head This commit looks good

This commit is contained in:
Kristian Knarvik 2023-01-28 09:20:27 +01:00
parent c84c2cf30e
commit faff982585
2 changed files with 7 additions and 7 deletions

View File

@ -93,7 +93,7 @@ public enum SmithPresetFilter {
HELMET(false, "_HELMET"),
/**
* Filters to only include chestplates
* Filters to only include chest-plates
*/
CHESTPLATE(false, "_CHESTPLATE"),

View File

@ -19,14 +19,14 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
*/
public class TypeValidatorHelperTest {
private static Enchantment curseOfBinding;
private static Enchantment infinity;
@BeforeAll
public static void setUp() {
//Note: When not testing against a real server, no default enchantments are loaded!
curseOfBinding = new EnchantmentMock(NamespacedKey.minecraft("binding_curse"),
"CURSE_OF_BINDING");
Enchantment.registerEnchantment(curseOfBinding);
infinity = new EnchantmentMock(NamespacedKey.minecraft("arrow_infinite"),
"INFINITY");
Enchantment.registerEnchantment(infinity);
}
@Test
@ -155,8 +155,8 @@ public class TypeValidatorHelperTest {
@Test
public void isValidEnchantmentValidTest() {
SettingValueType type = SettingValueType.ENCHANTMENT;
assertTrue(TypeValidationHelper.isValid(type, curseOfBinding, null));
assertTrue(TypeValidationHelper.isValid(type, "binding_curse", null));
assertTrue(TypeValidationHelper.isValid(type, infinity, null));
assertTrue(TypeValidationHelper.isValid(type, "arrow_infinite", null));
}
@Test