Fix OfferBookVIewModel constructor parameters in test

This commit is contained in:
Christoph Atteneder 2018-06-27 11:44:34 +02:00
parent 0e15f3c537
commit 34660d4ef7
No known key found for this signature in database
GPG Key ID: CD5DC1C529CDFD3B

View File

@ -231,8 +231,7 @@ public class OfferBookViewModelTest {
when(offerBook.getOfferBookListItems()).thenReturn(offerBookListItems);
final OfferBookViewModel model = new OfferBookViewModel(null, null, offerBook, empty, null, null,
null, null, null, null, null,
new BSFormatter());
null, null, null, null, new BSFormatter());
assertEquals(0, model.maxPlacesForAmount.intValue());
}
@ -246,8 +245,7 @@ public class OfferBookViewModelTest {
when(offerBook.getOfferBookListItems()).thenReturn(offerBookListItems);
final OfferBookViewModel model = new OfferBookViewModel(null, openOfferManager, offerBook, empty, null, null,
null, null, null, null, null,
new BSFormatter());
null, null, null, null, new BSFormatter());
model.activate();
assertEquals(6, model.maxPlacesForAmount.intValue());
@ -265,8 +263,7 @@ public class OfferBookViewModelTest {
when(offerBook.getOfferBookListItems()).thenReturn(offerBookListItems);
final OfferBookViewModel model = new OfferBookViewModel(null, openOfferManager, offerBook, empty, null, null,
null, null, null, null, null,
new BSFormatter());
null, null, null, null, new BSFormatter());
model.activate();
assertEquals(15, model.maxPlacesForAmount.intValue());
@ -285,8 +282,7 @@ public class OfferBookViewModelTest {
when(offerBook.getOfferBookListItems()).thenReturn(offerBookListItems);
final OfferBookViewModel model = new OfferBookViewModel(null, null, offerBook, empty, null, null,
null, null, null, null, null,
new BSFormatter());
null, null, null, null, new BSFormatter());
assertEquals(0, model.maxPlacesForVolume.intValue());
}
@ -300,8 +296,7 @@ public class OfferBookViewModelTest {
when(offerBook.getOfferBookListItems()).thenReturn(offerBookListItems);
final OfferBookViewModel model = new OfferBookViewModel(null, openOfferManager, offerBook, empty, null, null,
null, null, null, null, null,
new BSFormatter());
null, null, null, null, new BSFormatter());
model.activate();
assertEquals(8, model.maxPlacesForVolume.intValue());
@ -319,8 +314,7 @@ public class OfferBookViewModelTest {
when(offerBook.getOfferBookListItems()).thenReturn(offerBookListItems);
final OfferBookViewModel model = new OfferBookViewModel(null, openOfferManager, offerBook, empty, null, null,
null, null, null, null, null,
new BSFormatter());
null, null, null, null, new BSFormatter());
model.activate();
assertEquals(15, model.maxPlacesForVolume.intValue());
@ -339,8 +333,7 @@ public class OfferBookViewModelTest {
when(offerBook.getOfferBookListItems()).thenReturn(offerBookListItems);
final OfferBookViewModel model = new OfferBookViewModel(null, null, offerBook, empty, null, null,
null, null, null, null, null,
new BSFormatter());
null, null, null, null, new BSFormatter());
assertEquals(0, model.maxPlacesForPrice.intValue());
}
@ -354,8 +347,7 @@ public class OfferBookViewModelTest {
when(offerBook.getOfferBookListItems()).thenReturn(offerBookListItems);
final OfferBookViewModel model = new OfferBookViewModel(null, openOfferManager, offerBook, empty, null, null,
null, null, null, null, null,
new BSFormatter());
null, null, null, null, new BSFormatter());
model.activate();
assertEquals(7, model.maxPlacesForPrice.intValue());
@ -373,8 +365,7 @@ public class OfferBookViewModelTest {
when(offerBook.getOfferBookListItems()).thenReturn(offerBookListItems);
final OfferBookViewModel model = new OfferBookViewModel(null, null, offerBook, empty, null, null,
null, null, null, null, null,
new BSFormatter());
null, null, null, null, new BSFormatter());
assertEquals(0, model.maxPlacesForMarketPriceMargin.intValue());
}
@ -402,8 +393,7 @@ public class OfferBookViewModelTest {
offerBookListItems.addAll(item1, item2);
final OfferBookViewModel model = new OfferBookViewModel(null, openOfferManager, offerBook, empty, null, priceFeedService,
null, null, null, null, null,
new BSFormatter());
null, null, null, null, new BSFormatter());
model.activate();
assertEquals(8, model.maxPlacesForMarketPriceMargin.intValue()); //" (1.97%)"
@ -424,8 +414,7 @@ public class OfferBookViewModelTest {
when(priceFeedService.getMarketPrice(anyString())).thenReturn(new MarketPrice("USD", 12684.0450, Instant.now().getEpochSecond(), true));
final OfferBookViewModel model = new OfferBookViewModel(null, openOfferManager, offerBook, empty, null, null,
null, null, null, null, null,
new BSFormatter());
null, null, null, null, new BSFormatter());
final OfferBookListItem item = make(btcBuyItem.but(
with(useMarketBasedPrice, true),