Search in sources :

Example 6 with Wallet

use of com.github.robozonky.api.remote.entities.Wallet in project robozonky by RoboZonky.

the class SellingTest method mockApi.

private static Zonky mockApi() {
    final Zonky zonky = mock(Zonky.class);
    when(zonky.getWallet()).thenReturn(new Wallet(BigDecimal.TEN, BigDecimal.ZERO));
    when(zonky.getLoan(anyInt())).thenReturn(Loan.custom().build());
    return zonky;
}
Also used : Wallet(com.github.robozonky.api.remote.entities.Wallet) Zonky(com.github.robozonky.common.remote.Zonky)

Example 7 with Wallet

use of com.github.robozonky.api.remote.entities.Wallet in project robozonky by RoboZonky.

the class SessionTest method mockZonky.

private static Zonky mockZonky(final BigDecimal balance) {
    final Zonky zonky = mock(Zonky.class);
    when(zonky.getWallet()).thenReturn(new Wallet(balance, balance));
    return zonky;
}
Also used : Wallet(com.github.robozonky.api.remote.entities.Wallet) Zonky(com.github.robozonky.common.remote.Zonky)

Aggregations

Wallet (com.github.robozonky.api.remote.entities.Wallet)7 Zonky (com.github.robozonky.common.remote.Zonky)6 Test (org.junit.jupiter.api.Test)3 AbstractZonkyLeveragingTest (com.github.robozonky.app.AbstractZonkyLeveragingTest)2 BigDecimal (java.math.BigDecimal)2 CollectionsApi (com.github.robozonky.api.remote.CollectionsApi)1 ControlApi (com.github.robozonky.api.remote.ControlApi)1 LoanApi (com.github.robozonky.api.remote.LoanApi)1 ParticipationApi (com.github.robozonky.api.remote.ParticipationApi)1 PortfolioApi (com.github.robozonky.api.remote.PortfolioApi)1 WalletApi (com.github.robozonky.api.remote.WalletApi)1 BlockedAmount (com.github.robozonky.api.remote.entities.BlockedAmount)1 Participation (com.github.robozonky.api.remote.entities.Participation)1 RawDevelopment (com.github.robozonky.api.remote.entities.RawDevelopment)1 RawInvestment (com.github.robozonky.api.remote.entities.RawInvestment)1 RawLoan (com.github.robozonky.api.remote.entities.RawLoan)1 Loan (com.github.robozonky.api.remote.entities.sanitized.Loan)1 InvestmentStrategy (com.github.robozonky.api.strategies.InvestmentStrategy)1 LoanDescriptor (com.github.robozonky.api.strategies.LoanDescriptor)1 Authenticated (com.github.robozonky.app.authentication.Authenticated)1