Add a first test case

This commit is contained in:
Acrobot 2013-11-01 16:20:36 +01:00
parent 8afdc7edc7
commit 143b7a49af
2 changed files with 28 additions and 1 deletions

View File

@ -26,7 +26,7 @@ public class Give implements CommandExecutor {
sender.sendMessage(Messages.prefix(Messages.ACCESS_DENIED));
return true;
}
if (args.length < 1) {
return false;
}

View File

@ -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));
}
}