use of com.github.jnidzwetzki.cryptobot.portfolio.BasePortfolioManager in project crypto-bot by jnidzwetzki.
the class TestCapitalAllocation method buildPortfolioManager.
/**
* Build the portfolio manager
* @return
* @throws APIException
*/
private PortfolioManager buildPortfolioManager() throws APIException {
final Collection<Wallet> wallets = new ArrayList<>();
wallets.add(new Wallet(Wallet.WALLET_TYPE_EXCHANGE, "USD", 1000, 0, 1000));
final BitfinexApiBroker apiBroker = Mockito.mock(BitfinexApiBroker.class);
final WalletManager walletManager = Mockito.mock(WalletManager.class);
Mockito.when(walletManager.getWallets()).thenReturn(wallets);
Mockito.when(apiBroker.getWalletManager()).thenReturn(walletManager);
return new BasePortfolioManager(apiBroker, 0.05);
}
Aggregations