mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-21 14:24:06 +01:00
Fix tests
This commit is contained in:
parent
9f9349c835
commit
16e4b72d4d
2 changed files with 10 additions and 10 deletions
|
@ -103,9 +103,9 @@ public class OfferBookChartViewModelTest {
|
|||
model.activate();
|
||||
assertEquals(7, model.maxPlacesForBuyPrice.intValue());
|
||||
offerBookListItems.addAll(make(btcBuyItem.but(with(OfferBookListItemMaker.price, 94016475L))));
|
||||
assertEquals(7, model.maxPlacesForBuyPrice.intValue());
|
||||
assertEquals(9, model.maxPlacesForBuyPrice.intValue()); // 9401.6475
|
||||
offerBookListItems.addAll(make(btcBuyItem.but(with(OfferBookListItemMaker.price, 101016475L))));
|
||||
assertEquals(7, model.maxPlacesForBuyPrice.intValue());
|
||||
assertEquals(10, model.maxPlacesForBuyPrice.intValue()); //10101.6475
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -132,9 +132,9 @@ public class OfferBookChartViewModelTest {
|
|||
model.activate();
|
||||
assertEquals(4, model.maxPlacesForBuyVolume.intValue()); //0.01
|
||||
offerBookListItems.addAll(make(btcBuyItem.but(with(OfferBookListItemMaker.amount, 100000000L))));
|
||||
assertEquals(4, model.maxPlacesForBuyVolume.intValue()); //10.00
|
||||
assertEquals(5, model.maxPlacesForBuyVolume.intValue()); //10.00
|
||||
offerBookListItems.addAll(make(btcBuyItem.but(with(OfferBookListItemMaker.amount, 22128600000L))));
|
||||
assertEquals(4, model.maxPlacesForBuyVolume.intValue()); //2212.86
|
||||
assertEquals(7, model.maxPlacesForBuyVolume.intValue()); //2212.86
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -179,11 +179,11 @@ public class OfferBookChartViewModelTest {
|
|||
|
||||
final OfferBookChartViewModel model = new OfferBookChartViewModel(offerBook, empty, service, null, null, new BSFormatter());
|
||||
model.activate();
|
||||
assertEquals(7, model.maxPlacesForSellPrice.intValue());
|
||||
assertEquals(7, model.maxPlacesForSellPrice.intValue()); // 10.0000 default price
|
||||
offerBookListItems.addAll(make(btcSellItem.but(with(OfferBookListItemMaker.price, 94016475L))));
|
||||
assertEquals(7, model.maxPlacesForSellPrice.intValue());
|
||||
assertEquals(9, model.maxPlacesForSellPrice.intValue()); // 9401.6475
|
||||
offerBookListItems.addAll(make(btcSellItem.but(with(OfferBookListItemMaker.price, 101016475L))));
|
||||
assertEquals(7, model.maxPlacesForSellPrice.intValue());
|
||||
assertEquals(10, model.maxPlacesForSellPrice.intValue()); // 10101.6475
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -210,8 +210,8 @@ public class OfferBookChartViewModelTest {
|
|||
model.activate();
|
||||
assertEquals(4, model.maxPlacesForSellVolume.intValue()); //0.01
|
||||
offerBookListItems.addAll(make(btcSellItem.but(with(OfferBookListItemMaker.amount, 100000000L))));
|
||||
assertEquals(4, model.maxPlacesForSellVolume.intValue()); //10.00
|
||||
assertEquals(5, model.maxPlacesForSellVolume.intValue()); //10.00
|
||||
offerBookListItems.addAll(make(btcSellItem.but(with(OfferBookListItemMaker.amount, 22128600000L))));
|
||||
assertEquals(4, model.maxPlacesForSellVolume.intValue()); //2212.86
|
||||
assertEquals(7, model.maxPlacesForSellVolume.intValue()); //2212.86
|
||||
}
|
||||
}
|
||||
|
|
|
@ -114,7 +114,7 @@ public class BSFormatterTest {
|
|||
|
||||
@Test
|
||||
public void testFormatVolume() {
|
||||
assertEquals("0.01", formatter.formatVolume(make(btcUsdOffer), true, 4));
|
||||
assertEquals("1.00", formatter.formatVolume(make(btcUsdOffer), true, 4));
|
||||
assertEquals("100.00", formatter.formatVolume(make(usdVolume)));
|
||||
assertEquals("1774.62", formatter.formatVolume(make(usdVolume.but(with(volumeString, "1774.62")))));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue