Test cloning of CraftItemStacks created with null nms ItemStacks
By: Andrew Ardill <andrew.ardill@gmail.com>
This commit is contained in:
parent
1553d52430
commit
b0ac365f5e
1 changed files with 8 additions and 0 deletions
|
@ -25,4 +25,12 @@ public class CraftItemStackTest {
|
||||||
assert (clone.getTypeId() == itemStack.getTypeId());
|
assert (clone.getTypeId() == itemStack.getTypeId());
|
||||||
assert (clone.getData().equals(itemStack.getData()));
|
assert (clone.getData().equals(itemStack.getData()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testCloneNullItem() throws Exception {
|
||||||
|
net.minecraft.server.ItemStack nmsItemStack = null;
|
||||||
|
ItemStack itemStack = new CraftItemStack(nmsItemStack);
|
||||||
|
ItemStack clone = itemStack.clone();
|
||||||
|
assert (clone.equals(itemStack));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue