mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 07:07:43 +01:00
Fix missing param in test class
This commit is contained in:
parent
d09296e86c
commit
28d0db8ac8
1 changed files with 4 additions and 2 deletions
|
@ -22,6 +22,7 @@ import bisq.desktop.util.validation.BtcValidator;
|
||||||
import bisq.desktop.util.validation.FiatPriceValidator;
|
import bisq.desktop.util.validation.FiatPriceValidator;
|
||||||
import bisq.desktop.util.validation.SecurityDepositValidator;
|
import bisq.desktop.util.validation.SecurityDepositValidator;
|
||||||
|
|
||||||
|
import bisq.core.btc.TxFeeEstimationService;
|
||||||
import bisq.core.btc.model.AddressEntry;
|
import bisq.core.btc.model.AddressEntry;
|
||||||
import bisq.core.btc.wallet.BsqWalletService;
|
import bisq.core.btc.wallet.BsqWalletService;
|
||||||
import bisq.core.btc.wallet.BtcWalletService;
|
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,
|
@PrepareForTest({BtcWalletService.class, AddressEntry.class, PriceFeedService.class, User.class,
|
||||||
FeeService.class, CreateOfferDataModel.class, PaymentAccount.class, BsqWalletService.class,
|
FeeService.class, CreateOfferDataModel.class, PaymentAccount.class, BsqWalletService.class,
|
||||||
SecurityDepositValidator.class, AccountAgeWitnessService.class, BsqFormatter.class, Preferences.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.*"})
|
@PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*"})
|
||||||
public class CreateOfferViewModelTest {
|
public class CreateOfferViewModelTest {
|
||||||
|
|
||||||
|
@ -98,6 +99,7 @@ public class CreateOfferViewModelTest {
|
||||||
BsqWalletService bsqWalletService = mock(BsqWalletService.class);
|
BsqWalletService bsqWalletService = mock(BsqWalletService.class);
|
||||||
SecurityDepositValidator securityDepositValidator = mock(SecurityDepositValidator.class);
|
SecurityDepositValidator securityDepositValidator = mock(SecurityDepositValidator.class);
|
||||||
AccountAgeWitnessService accountAgeWitnessService = mock(AccountAgeWitnessService.class);
|
AccountAgeWitnessService accountAgeWitnessService = mock(AccountAgeWitnessService.class);
|
||||||
|
TxFeeEstimationService txFeeEstimationService = mock(TxFeeEstimationService.class);
|
||||||
|
|
||||||
when(btcWalletService.getOrCreateAddressEntry(anyString(), any())).thenReturn(addressEntry);
|
when(btcWalletService.getOrCreateAddressEntry(anyString(), any())).thenReturn(addressEntry);
|
||||||
when(btcWalletService.getBalanceForAddress(any())).thenReturn(Coin.valueOf(1000L));
|
when(btcWalletService.getBalanceForAddress(any())).thenReturn(Coin.valueOf(1000L));
|
||||||
|
@ -112,7 +114,7 @@ public class CreateOfferViewModelTest {
|
||||||
when(bsqFormatter.formatCoin(any())).thenReturn("0");
|
when(bsqFormatter.formatCoin(any())).thenReturn("0");
|
||||||
when(bsqWalletService.getAvailableBalance()).thenReturn(Coin.ZERO);
|
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.initWithData(OfferPayload.Direction.BUY, new CryptoCurrency("BTC", "bitcoin"));
|
||||||
dataModel.activate();
|
dataModel.activate();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue