ge: fix computing bought/sold amount

Use the total spent price instead of the delta spent price, as it is
being divided by the total quantity
This commit is contained in:
Adam
2020-06-06 00:01:08 -04:00
parent dfce3bd7fc
commit a1122ba141
4 changed files with 7 additions and 4 deletions

View File

@@ -135,6 +135,7 @@ public class GrandExchangePluginTest
@Test
public void testSubmitTrade()
{
// 1 @ 25
SavedOffer savedOffer = new SavedOffer();
savedOffer.setItemId(ItemID.ABYSSAL_WHIP);
savedOffer.setQuantitySold(1);
@@ -162,7 +163,8 @@ public class GrandExchangePluginTest
assertEquals(ItemID.ABYSSAL_WHIP, trade.getItemId());
assertEquals(2, trade.getDqty());
assertEquals(10, trade.getTotal());
assertEquals(20, trade.getSpent());
assertEquals(45, trade.getSpent());
assertEquals(20, trade.getDspent());
}
@Test