Get ItemOnItemVerificationHandlerTest passing

This commit is contained in:
Gary Tierney
2015-09-13 01:14:04 +01:00
parent a5f8b1f9fd
commit c9b702bcfb
@@ -21,7 +21,10 @@ import static org.junit.Assert.assertTrue;
@PrepareForTest({Player.class, ItemDefinition.class})
public class ItemOnItemVerificationHandlerTest {
private ItemOnItemVerificationHandler verificationHandler = new ItemOnItemVerificationHandler(new World());
private World world = new World();
private ItemOnItemVerificationHandler itemOnItemVerificationHandler = new ItemOnItemVerificationHandler(world);
private ItemVerificationHandler itemVerificationHandler = new ItemVerificationHandler(world);
@BeforeClass
public static void setupTestItemDefinitions() {
@@ -40,7 +43,8 @@ public class ItemOnItemVerificationHandlerTest {
ItemOnItemMessage itemOnItemMessage = new ItemOnItemMessage(BankConstants.SIDEBAR_INVENTORY_ID, 500, 1,
BankConstants.SIDEBAR_INVENTORY_ID, 4151, 1);
verificationHandler.handle(player, itemOnItemMessage);
itemVerificationHandler.handle(player, itemOnItemMessage);
itemOnItemVerificationHandler.handle(player, itemOnItemMessage);
assertTrue("ItemOnItemVerificationHandler: failed checking source item / slot exists", itemOnItemMessage.terminated());
}