@@ -15,7 +15,7 @@ import org.junit.runners.Parameterized.Parameters;
|
||||
@RunWith(Parameterized.class)
|
||||
public class DyeColorsTest extends AbstractTestingBase {
|
||||
|
||||
@Parameters(name= "{index}: {0}")
|
||||
@Parameters(name = "{index}: {0}")
|
||||
public static List<Object[]> data() {
|
||||
List<Object[]> list = new ArrayList<Object[]>();
|
||||
for (DyeColor dye : DyeColor.values()) {
|
||||
|
||||
@@ -40,7 +40,7 @@ public class PerMaterialTest extends AbstractTestingBase {
|
||||
fireValues = Util.getInternalState(BlockFire.class, Blocks.FIRE, "flameChances");
|
||||
}
|
||||
|
||||
@Parameters(name= "{index}: {0}")
|
||||
@Parameters(name = "{index}: {0}")
|
||||
public static List<Object[]> data() {
|
||||
List<Object[]> list = Lists.newArrayList();
|
||||
for (Material material : Material.values()) {
|
||||
@@ -91,7 +91,7 @@ public class PerMaterialTest extends AbstractTestingBase {
|
||||
|
||||
if (material == Material.AIR) {
|
||||
assertThat((int) material.getMaxDurability(), is(0));
|
||||
} else if (material.isBlock()){
|
||||
} else if (material.isBlock()) {
|
||||
Item item = CraftMagicNumbers.getItem(material);
|
||||
assertThat((int) material.getMaxDurability(), is(item.getMaxDurability()));
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ public class FactoryItemMaterialTest extends AbstractTestingBase {
|
||||
return buffer.delete(0, Integer.MAX_VALUE).append(from.getClass().getName()).append('(').append(from.name()).append(") to ").append(to.getClass().getName()).append('(').append(to.name()).append(')').toString();
|
||||
}
|
||||
|
||||
@Parameters(name="Material[{index}]:{0}")
|
||||
@Parameters(name = "Material[{index}]:{0}")
|
||||
public static List<Object[]> data() {
|
||||
List<Object[]> list = new ArrayList<Object[]>();
|
||||
for (Material material : materials) {
|
||||
|
||||
@@ -19,7 +19,7 @@ import org.junit.runners.Parameterized.Parameters;
|
||||
public class ItemMetaImplementationOverrideTest {
|
||||
static final Class<CraftMetaItem> parent = CraftMetaItem.class;
|
||||
|
||||
@Parameters(name="[{index}]:{1}")
|
||||
@Parameters(name = "[{index}]:{1}")
|
||||
public static List<Object[]> data() {
|
||||
final List<Object[]> testData = new ArrayList<Object[]>();
|
||||
List<Class<? extends CraftMetaItem>> classes = new ArrayList<Class<? extends CraftMetaItem>>();
|
||||
|
||||
@@ -56,22 +56,22 @@ public class ItemMetaTest extends AbstractTestingBase {
|
||||
|
||||
static final int MAX_FIREWORK_POWER = 127; // Please update ItemStackFireworkTest if/when this gets changed.
|
||||
|
||||
@Test(expected=IllegalArgumentException.class)
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void testPowerLimitExact() {
|
||||
newFireworkMeta().setPower(MAX_FIREWORK_POWER + 1);
|
||||
}
|
||||
|
||||
@Test(expected=IllegalArgumentException.class)
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void testPowerLimitMax() {
|
||||
newFireworkMeta().setPower(Integer.MAX_VALUE);
|
||||
}
|
||||
|
||||
@Test(expected=IllegalArgumentException.class)
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void testPowerLimitMin() {
|
||||
newFireworkMeta().setPower(Integer.MIN_VALUE);
|
||||
}
|
||||
|
||||
@Test(expected=IllegalArgumentException.class)
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void testPowerLimitNegative() {
|
||||
newFireworkMeta().setPower(-1);
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ import org.junit.runners.Parameterized.Parameters;
|
||||
@RunWith(Parameterized.class)
|
||||
public class ItemStackBookTest extends ItemStackTest {
|
||||
|
||||
@Parameters(name="[{index}]:{" + NAME_PARAMETER + "}")
|
||||
@Parameters(name = "[{index}]:{" + NAME_PARAMETER + "}")
|
||||
public static List<Object[]> data() {
|
||||
return StackProvider.compound(operators(), "%s %s", NAME_PARAMETER, Material.WRITTEN_BOOK, Material.WRITABLE_BOOK);
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ import org.junit.runners.Parameterized.Parameters;
|
||||
@RunWith(Parameterized.class)
|
||||
public class ItemStackEnchantStorageTest extends ItemStackTest {
|
||||
|
||||
@Parameters(name="[{index}]:{" + NAME_PARAMETER + "}")
|
||||
@Parameters(name = "[{index}]:{" + NAME_PARAMETER + "}")
|
||||
public static List<Object[]> data() {
|
||||
return StackProvider.compound(operators(), "%s %s", NAME_PARAMETER, Material.ENCHANTED_BOOK);
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ import org.junit.runners.Parameterized.Parameters;
|
||||
@RunWith(Parameterized.class)
|
||||
public class ItemStackFireworkChargeTest extends ItemStackTest {
|
||||
|
||||
@Parameters(name="[{index}]:{" + NAME_PARAMETER + "}")
|
||||
@Parameters(name = "[{index}]:{" + NAME_PARAMETER + "}")
|
||||
public static List<Object[]> data() {
|
||||
return StackProvider.compound(operators(), "%s %s", NAME_PARAMETER, Material.FIREWORK_STAR);
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ import org.junit.runners.Parameterized.Parameters;
|
||||
@RunWith(Parameterized.class)
|
||||
public class ItemStackFireworkTest extends ItemStackTest {
|
||||
|
||||
@Parameters(name="[{index}]:{" + NAME_PARAMETER + "}")
|
||||
@Parameters(name = "[{index}]:{" + NAME_PARAMETER + "}")
|
||||
public static List<Object[]> data() {
|
||||
return StackProvider.compound(operators(), "%s %s", NAME_PARAMETER, Material.FIREWORK_ROCKET);
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ import org.junit.runners.Parameterized.Parameters;
|
||||
@RunWith(Parameterized.class)
|
||||
public class ItemStackLeatherTest extends ItemStackTest {
|
||||
|
||||
@Parameters(name="[{index}]:{" + NAME_PARAMETER + "}")
|
||||
@Parameters(name = "[{index}]:{" + NAME_PARAMETER + "}")
|
||||
public static List<Object[]> data() {
|
||||
return StackProvider.compound(operators(), "%s %s", NAME_PARAMETER, Material.LEATHER_BOOTS, Material.LEATHER_CHESTPLATE, Material.LEATHER_HELMET, Material.LEATHER_LEGGINGS);
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ import org.junit.runners.Parameterized.Parameters;
|
||||
@RunWith(Parameterized.class)
|
||||
public class ItemStackLoreEnchantmentTest extends ItemStackTest {
|
||||
|
||||
@Parameters(name="[{index}]:{" + NAME_PARAMETER + "}")
|
||||
@Parameters(name = "[{index}]:{" + NAME_PARAMETER + "}")
|
||||
public static List<Object[]> data() {
|
||||
return StackProvider.compound(operators(), "%s %s", NAME_PARAMETER, ItemStackTest.COMPOUND_MATERIALS);
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ import org.junit.runners.Parameterized.Parameters;
|
||||
@RunWith(Parameterized.class)
|
||||
public class ItemStackMapTest extends ItemStackTest {
|
||||
|
||||
@Parameters(name="[{index}]:{" + NAME_PARAMETER + "}")
|
||||
@Parameters(name = "[{index}]:{" + NAME_PARAMETER + "}")
|
||||
public static List<Object[]> data() {
|
||||
return StackProvider.compound(operators(), "%s %s", NAME_PARAMETER, Material.FILLED_MAP);
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ import org.junit.runners.Parameterized.Parameters;
|
||||
@RunWith(Parameterized.class)
|
||||
public class ItemStackPotionsTest extends ItemStackTest {
|
||||
|
||||
@Parameters(name="[{index}]:{" + NAME_PARAMETER + "}")
|
||||
@Parameters(name = "[{index}]:{" + NAME_PARAMETER + "}")
|
||||
public static List<Object[]> data() {
|
||||
return StackProvider.compound(operators(), "%s %s", NAME_PARAMETER, Material.POTION);
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ import org.junit.runners.Parameterized.Parameters;
|
||||
@RunWith(Parameterized.class)
|
||||
public class ItemStackSkullTest extends ItemStackTest {
|
||||
|
||||
@Parameters(name="[{index}]:{" + NAME_PARAMETER + "}")
|
||||
@Parameters(name = "[{index}]:{" + NAME_PARAMETER + "}")
|
||||
public static List<Object[]> data() {
|
||||
return StackProvider.compound(operators(), "%s %s", NAME_PARAMETER, Material.PLAYER_HEAD);
|
||||
}
|
||||
|
||||
@@ -305,7 +305,7 @@ public class ItemStackTest extends AbstractTestingBase {
|
||||
}
|
||||
}
|
||||
|
||||
@Parameters(name="[{index}]:{" + NAME_PARAMETER + "}")
|
||||
@Parameters(name = "[{index}]:{" + NAME_PARAMETER + "}")
|
||||
public static List<Object[]> data() {
|
||||
return ImmutableList.of(); // TODO, test basic durability issues
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ public class EntityTypesTest extends AbstractTestingBase {
|
||||
public void testMaps() {
|
||||
Set<EntityType> allBukkit = Arrays.stream(EntityType.values()).filter((b) -> b.getName() != null).collect(Collectors.toSet());
|
||||
|
||||
for (EntityTypes<?> nms : IRegistry.ENTITY_TYPE) {
|
||||
for (EntityTypes<?> nms : IRegistry.ENTITY_TYPE) {
|
||||
MinecraftKey key = EntityTypes.getName(nms);
|
||||
|
||||
EntityType bukkit = EntityType.fromName(key.getKey());
|
||||
|
||||
@@ -17,7 +17,7 @@ public class PotionTest extends AbstractTestingBase {
|
||||
public void testEffectCompleteness() throws Throwable {
|
||||
Map<PotionType, String> effects = new EnumMap(PotionType.class);
|
||||
for (Object reg : IRegistry.POTION) {
|
||||
List<MobEffect> eff = ((PotionRegistry)reg).a();
|
||||
List<MobEffect> eff = ((PotionRegistry) reg).a();
|
||||
if (eff.size() != 1) continue;
|
||||
int id = MobEffectList.getId(eff.get(0).getMobEffect());
|
||||
PotionEffectType type = PotionEffectType.getById(id);
|
||||
|
||||
@@ -19,9 +19,9 @@ import org.junit.Assert;
|
||||
|
||||
/**
|
||||
* If you are getting: java.lang.ExceptionInInitializerError
|
||||
* at net.minecraft.server.StatisticList.<clinit>(SourceFile:58)
|
||||
* at net.minecraft.server.Item.<clinit>(SourceFile:252)
|
||||
* at net.minecraft.server.Block.<clinit>(Block.java:577)
|
||||
* at net.minecraft.server.StatisticList.<clinit>(SourceFile:58)
|
||||
* at net.minecraft.server.Item.<clinit>(SourceFile:252)
|
||||
* at net.minecraft.server.Block.<clinit>(Block.java:577)
|
||||
*
|
||||
* extend this class to solve it.
|
||||
*/
|
||||
|
||||
@@ -16,7 +16,7 @@ import org.bukkit.craftbukkit.util.CraftMagicNumbers;
|
||||
import org.bukkit.craftbukkit.util.CraftNamespacedKey;
|
||||
import org.bukkit.craftbukkit.util.Versioning;
|
||||
|
||||
public class DummyServer implements InvocationHandler {
|
||||
public final class DummyServer implements InvocationHandler {
|
||||
private static interface MethodHandler {
|
||||
Object handle(DummyServer server, Object[] args);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user