public void IsEligibleForQuickDrop_ThisItemIsNotStackable_ReturnsTrue() { IEquippableItemIconConstArg arg; TestEqpII testEqpII = CreateTestEqpII(out arg); IUIItem item = arg.item; item.IsStackable().Returns(false); Assert.That(testEqpII.TestIsEligibleForQuickDrop(), Is.True); }
public override void InitImage() { thisStateEngine.SetToDisemptifyingState(); if (thisItemIcon.GetItemQuantity() == 0 && thisItemIcon.LeavesGhost()) { thisItemIcon.Ghostify(); } IUIItem item = thisItemIcon.GetUIItem(); if (item.IsStackable()) { thisItemIcon.SetQuantityInstantly(0); thisItemIcon.UpdateQuantity(thisItemIcon.GetItemQuantity(), true); } }
public void UpdateQuantity(int targetQuantity, bool doesIncrement) { SetQuantity(targetQuantity); if (thisItem.IsStackable()) { if (doesIncrement) { thisQuantityAnimationEngine.AnimateQuantityImageIncrementally(targetQuantity); } else { thisQuantityAnimationEngine.AnimateQuantityImageAtOnce(targetQuantity); } } }
public void IsEligibleForQuickDrop_ThisItemIsStackable_ThisHasSameItemAsHoveredEqpII_ReturnsFalse() { IEquippableItemIconConstArg arg; TestEqpII testEqpII = CreateTestEqpII(out arg); IUIItem item = arg.item; item.IsStackable().Returns(true); IEquippableItemIcon hoveredEqpII = Substitute.For <IEquippableItemIcon>(); IEquippableUIItem hoveredItem = Substitute.For <IEquippableUIItem>(); hoveredEqpII.GetEquippableItem().Returns(hoveredItem); item.IsSameAs(hoveredItem).Returns(true); ((IEquippableIITAManager)arg.iiTAM).GetHoveredEqpII().Returns(hoveredEqpII); Assert.That(testEqpII.TestIsEligibleForQuickDrop(), Is.False); }