Fix missing param in test class

This commit is contained in:
Manfred Karrer 2019-01-12 00:16:57 +01:00
parent d09296e86c
commit 28d0db8ac8
No known key found for this signature in database
GPG key ID: 401250966A6B2C46

View file

@ -22,6 +22,7 @@ import bisq.desktop.util.validation.BtcValidator;
import bisq.desktop.util.validation.FiatPriceValidator;
import bisq.desktop.util.validation.SecurityDepositValidator;
import bisq.core.btc.TxFeeEstimationService;
import bisq.core.btc.model.AddressEntry;
import bisq.core.btc.wallet.BsqWalletService;
import bisq.core.btc.wallet.BtcWalletService;
@ -70,7 +71,7 @@ import static org.mockito.Mockito.when;
@PrepareForTest({BtcWalletService.class, AddressEntry.class, PriceFeedService.class, User.class,
FeeService.class, CreateOfferDataModel.class, PaymentAccount.class, BsqWalletService.class,
SecurityDepositValidator.class, AccountAgeWitnessService.class, BsqFormatter.class, Preferences.class,
BsqWalletService.class})
BsqWalletService.class, TxFeeEstimationService.class})
@PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*"})
public class CreateOfferViewModelTest {
@ -98,6 +99,7 @@ public class CreateOfferViewModelTest {
BsqWalletService bsqWalletService = mock(BsqWalletService.class);
SecurityDepositValidator securityDepositValidator = mock(SecurityDepositValidator.class);
AccountAgeWitnessService accountAgeWitnessService = mock(AccountAgeWitnessService.class);
TxFeeEstimationService txFeeEstimationService = mock(TxFeeEstimationService.class);
when(btcWalletService.getOrCreateAddressEntry(anyString(), any())).thenReturn(addressEntry);
when(btcWalletService.getBalanceForAddress(any())).thenReturn(Coin.valueOf(1000L));
@ -112,7 +114,7 @@ public class CreateOfferViewModelTest {
when(bsqFormatter.formatCoin(any())).thenReturn("0");
when(bsqWalletService.getAvailableBalance()).thenReturn(Coin.ZERO);
CreateOfferDataModel dataModel = new CreateOfferDataModel(null, btcWalletService, bsqWalletService, empty, user, null, null, priceFeedService, null, accountAgeWitnessService, null, feeService, null, bsFormatter);
CreateOfferDataModel dataModel = new CreateOfferDataModel(null, btcWalletService, bsqWalletService, empty, user, null, null, priceFeedService, null, accountAgeWitnessService, feeService, txFeeEstimationService, null, bsFormatter);
dataModel.initWithData(OfferPayload.Direction.BUY, new CryptoCurrency("BTC", "bitcoin"));
dataModel.activate();