Add a first test case
This commit is contained in:
parent
8afdc7edc7
commit
143b7a49af
|
@ -26,7 +26,7 @@ public class Give implements CommandExecutor {
|
|||
sender.sendMessage(Messages.prefix(Messages.ACCESS_DENIED));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
if (args.length < 1) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
package com.Acrobot.ChestShop.Tests;
|
||||
|
||||
import com.Acrobot.Breeze.Utils.MaterialUtil;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
/**
|
||||
* Tests for {@link com.Acrobot.Breeze.Utils.MaterialUtil}
|
||||
*
|
||||
* @author Acrobot
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class MaterialTest {
|
||||
|
||||
@Test
|
||||
public void testForBlank() {
|
||||
ItemStack air = new ItemStack(Material.AIR);
|
||||
|
||||
assertTrue(MaterialUtil.isEmpty(air));
|
||||
assertTrue(MaterialUtil.isEmpty(null));
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue