Search in sources :

Example 16 with Event

use of com.github.robozonky.api.notifications.Event in project robozonky by RoboZonky.

the class JmxListenerService method newListener.

private static <T extends Event> EventListener<T> newListener(final Class<T> eventType) {
    if (Objects.equals(eventType, ExecutionStartedEvent.class)) {
        return (event, sessionInfo) -> callOnPortfolio(bean -> bean.handle((ExecutionStartedEvent) event));
    } else if (Objects.equals(eventType, ExecutionCompletedEvent.class)) {
        return (event, sessionInfo) -> {
            final ExecutionCompletedEvent evt = (ExecutionCompletedEvent) event;
            callOnRuntime(bean -> bean.handle(evt, sessionInfo));
            callOnPortfolio(bean -> bean.handle(evt));
        };
    } else if (Objects.equals(eventType, SellingStartedEvent.class)) {
        return (event, sessionInfo) -> callOnPortfolio(bean -> bean.handle((SellingStartedEvent) event));
    } else if (Objects.equals(eventType, SellingCompletedEvent.class)) {
        return (event, sessionInfo) -> callOnPortfolio(bean -> bean.handle((SellingCompletedEvent) event));
    } else if (Objects.equals(eventType, PurchasingStartedEvent.class)) {
        return (event, sessionInfo) -> callOnPortfolio(bean -> bean.handle((PurchasingStartedEvent) event));
    } else if (Objects.equals(eventType, PurchasingCompletedEvent.class)) {
        return (event, sessionInfo) -> callOnPortfolio(bean -> bean.handle((PurchasingCompletedEvent) event));
    } else if (Objects.equals(eventType, InvestmentDelegatedEvent.class)) {
        return (event, sessionInfo) -> callOnOperations(bean -> bean.handle((InvestmentDelegatedEvent) event));
    } else if (Objects.equals(eventType, InvestmentRejectedEvent.class)) {
        return (event, sessionInfo) -> callOnOperations(bean -> bean.handle((InvestmentRejectedEvent) event));
    } else if (Objects.equals(eventType, InvestmentMadeEvent.class)) {
        return (event, sessionInfo) -> callOnOperations(bean -> bean.handle((InvestmentMadeEvent) event));
    } else if (Objects.equals(eventType, SaleOfferedEvent.class)) {
        return (event, sessionInfo) -> callOnOperations(bean -> bean.handle((SaleOfferedEvent) event));
    } else if (Objects.equals(eventType, InvestmentPurchasedEvent.class)) {
        return (event, sessionInfo) -> callOnOperations(bean -> bean.handle((InvestmentPurchasedEvent) event));
    } else {
        return null;
    }
}
Also used : EventListenerSupplier(com.github.robozonky.api.notifications.EventListenerSupplier) ExecutionCompletedEvent(com.github.robozonky.api.notifications.ExecutionCompletedEvent) Logger(org.slf4j.Logger) PurchasingCompletedEvent(com.github.robozonky.api.notifications.PurchasingCompletedEvent) LoggerFactory(org.slf4j.LoggerFactory) ExecutionStartedEvent(com.github.robozonky.api.notifications.ExecutionStartedEvent) InvestmentPurchasedEvent(com.github.robozonky.api.notifications.InvestmentPurchasedEvent) InvestmentDelegatedEvent(com.github.robozonky.api.notifications.InvestmentDelegatedEvent) ListenerService(com.github.robozonky.api.notifications.ListenerService) Event(com.github.robozonky.api.notifications.Event) SellingCompletedEvent(com.github.robozonky.api.notifications.SellingCompletedEvent) Objects(java.util.Objects) Consumer(java.util.function.Consumer) SellingStartedEvent(com.github.robozonky.api.notifications.SellingStartedEvent) Map(java.util.Map) EventListener(com.github.robozonky.api.notifications.EventListener) PurchasingStartedEvent(com.github.robozonky.api.notifications.PurchasingStartedEvent) SaleOfferedEvent(com.github.robozonky.api.notifications.SaleOfferedEvent) Optional(java.util.Optional) InvestmentMadeEvent(com.github.robozonky.api.notifications.InvestmentMadeEvent) Collections(java.util.Collections) InvestmentRejectedEvent(com.github.robozonky.api.notifications.InvestmentRejectedEvent) ExecutionCompletedEvent(com.github.robozonky.api.notifications.ExecutionCompletedEvent) SellingCompletedEvent(com.github.robozonky.api.notifications.SellingCompletedEvent) ExecutionStartedEvent(com.github.robozonky.api.notifications.ExecutionStartedEvent) SellingStartedEvent(com.github.robozonky.api.notifications.SellingStartedEvent) InvestmentDelegatedEvent(com.github.robozonky.api.notifications.InvestmentDelegatedEvent) PurchasingStartedEvent(com.github.robozonky.api.notifications.PurchasingStartedEvent) InvestmentPurchasedEvent(com.github.robozonky.api.notifications.InvestmentPurchasedEvent) InvestmentRejectedEvent(com.github.robozonky.api.notifications.InvestmentRejectedEvent) SaleOfferedEvent(com.github.robozonky.api.notifications.SaleOfferedEvent) PurchasingCompletedEvent(com.github.robozonky.api.notifications.PurchasingCompletedEvent) InvestmentMadeEvent(com.github.robozonky.api.notifications.InvestmentMadeEvent)

Example 17 with Event

use of com.github.robozonky.api.notifications.Event in project robozonky by RoboZonky.

the class Session method invest.

/**
 * Request {@link ControlApi} to invest in a given loan, leveraging the {@link ConfirmationProvider}.
 * @param recommendation Loan to invest into.
 * @return True if investment successful. The investment is reflected in {@link #getResult()}.
 */
public boolean invest(final RecommendedLoan recommendation) {
    final LoanDescriptor loan = recommendation.descriptor();
    final int loanId = loan.item().getId();
    if (portfolioOverview.getCzkAvailable() < recommendation.amount().intValue()) {
        // should not be allowed by the calling code
        return false;
    }
    Events.fire(new InvestmentRequestedEvent(recommendation));
    final boolean seenBefore = state.getSeenLoans().stream().anyMatch(l -> isSameLoan(l, loanId));
    final ZonkyResponse response = investor.invest(recommendation, seenBefore);
    Session.LOGGER.debug("Response for loan {}: {}.", loanId, response);
    final String providerId = investor.getConfirmationProviderId().orElse("-");
    switch(response.getType()) {
        case REJECTED:
            return investor.getConfirmationProviderId().map(c -> {
                Events.fire(new InvestmentRejectedEvent(recommendation, providerId));
                // rejected through a confirmation provider => forget
                discard(loan);
                return false;
            }).orElseGet(() -> {
                // rejected due to no confirmation provider => make available for direct investment later
                Events.fire(new InvestmentSkippedEvent(recommendation));
                Session.LOGGER.debug("Loan #{} protected by CAPTCHA, will check back later.", loanId);
                skip(loan);
                return false;
            });
        case DELEGATED:
            final Event e = new InvestmentDelegatedEvent(recommendation, providerId);
            Events.fire(e);
            if (recommendation.isConfirmationRequired()) {
                // confirmation required, delegation successful => forget
                discard(loan);
            } else {
                // confirmation not required, delegation successful => make available for direct investment later
                skip(loan);
            }
            return false;
        case INVESTED:
            final int confirmedAmount = response.getConfirmedAmount().getAsInt();
            final Investment i = Investment.fresh(recommendation.descriptor().item(), confirmedAmount);
            markSuccessfulInvestment(i);
            Events.fire(new InvestmentMadeEvent(i, loan.item(), portfolioOverview));
            return true;
        case // still protected by CAPTCHA
        SEEN_BEFORE:
            return false;
        default:
            throw new IllegalStateException("Not possible.");
    }
}
Also used : RecommendedLoan(com.github.robozonky.api.strategies.RecommendedLoan) ExecutionCompletedEvent(com.github.robozonky.api.notifications.ExecutionCompletedEvent) TransactionCategory(com.github.robozonky.api.remote.enums.TransactionCategory) LoggerFactory(org.slf4j.LoggerFactory) InvestmentDelegatedEvent(com.github.robozonky.api.notifications.InvestmentDelegatedEvent) ControlApi(com.github.robozonky.api.remote.ControlApi) FastList(org.eclipse.collections.impl.list.mutable.FastList) ArrayList(java.util.ArrayList) BlockedAmount(com.github.robozonky.api.remote.entities.BlockedAmount) Events(com.github.robozonky.app.Events) Authenticated(com.github.robozonky.app.authentication.Authenticated) Defaults(com.github.robozonky.internal.api.Defaults) ConfirmationProvider(com.github.robozonky.api.confirmations.ConfirmationProvider) InvestmentRejectedEvent(com.github.robozonky.api.notifications.InvestmentRejectedEvent) LoanDescriptor(com.github.robozonky.api.strategies.LoanDescriptor) Logger(org.slf4j.Logger) Collection(java.util.Collection) ExecutionStartedEvent(com.github.robozonky.api.notifications.ExecutionStartedEvent) Collectors(java.util.stream.Collectors) Event(com.github.robozonky.api.notifications.Event) List(java.util.List) InvestmentRequestedEvent(com.github.robozonky.api.notifications.InvestmentRequestedEvent) PortfolioOverview(com.github.robozonky.api.strategies.PortfolioOverview) Investment(com.github.robozonky.api.remote.entities.sanitized.Investment) InvestmentMadeEvent(com.github.robozonky.api.notifications.InvestmentMadeEvent) InvestmentSkippedEvent(com.github.robozonky.api.notifications.InvestmentSkippedEvent) Portfolio(com.github.robozonky.app.portfolio.Portfolio) Collections(java.util.Collections) LoanRecommendedEvent(com.github.robozonky.api.notifications.LoanRecommendedEvent) InvestmentDelegatedEvent(com.github.robozonky.api.notifications.InvestmentDelegatedEvent) LoanDescriptor(com.github.robozonky.api.strategies.LoanDescriptor) InvestmentRequestedEvent(com.github.robozonky.api.notifications.InvestmentRequestedEvent) ExecutionCompletedEvent(com.github.robozonky.api.notifications.ExecutionCompletedEvent) InvestmentDelegatedEvent(com.github.robozonky.api.notifications.InvestmentDelegatedEvent) InvestmentRejectedEvent(com.github.robozonky.api.notifications.InvestmentRejectedEvent) ExecutionStartedEvent(com.github.robozonky.api.notifications.ExecutionStartedEvent) Event(com.github.robozonky.api.notifications.Event) InvestmentRequestedEvent(com.github.robozonky.api.notifications.InvestmentRequestedEvent) InvestmentMadeEvent(com.github.robozonky.api.notifications.InvestmentMadeEvent) InvestmentSkippedEvent(com.github.robozonky.api.notifications.InvestmentSkippedEvent) LoanRecommendedEvent(com.github.robozonky.api.notifications.LoanRecommendedEvent) InvestmentSkippedEvent(com.github.robozonky.api.notifications.InvestmentSkippedEvent) InvestmentRejectedEvent(com.github.robozonky.api.notifications.InvestmentRejectedEvent) Investment(com.github.robozonky.api.remote.entities.sanitized.Investment) InvestmentMadeEvent(com.github.robozonky.api.notifications.InvestmentMadeEvent)

Example 18 with Event

use of com.github.robozonky.api.notifications.Event in project robozonky by RoboZonky.

the class JmxListenerServiceTest method getParametersForInvestmentMade.

private DynamicTest getParametersForInvestmentMade() {
    final Loan l = mockLoan();
    final Investment i = Investment.fresh((MarketplaceLoan) l, 200);
    final PortfolioOverview po = PortfolioOverview.calculate(BigDecimal.valueOf(1000), Stream::empty);
    final Event evt = new InvestmentMadeEvent(i, l, po);
    final Consumer<SoftAssertions> before = (softly) -> {
        final OperationsMBean mbean = getOperationsMBean();
        softly.assertThat(mbean.getSuccessfulInvestments()).isEmpty();
    };
    final Consumer<SoftAssertions> after = (softly) -> {
        final OperationsMBean mbean = getOperationsMBean();
        softly.assertThat(mbean.getSuccessfulInvestments()).containsOnlyKeys(l.getId());
        softly.assertThat(mbean.getLatestUpdatedDateTime()).isEqualTo(evt.getCreatedOn());
    };
    return getParameters(evt, before, after);
}
Also used : RecommendedLoan(com.github.robozonky.api.strategies.RecommendedLoan) ExecutionCompletedEvent(com.github.robozonky.api.notifications.ExecutionCompletedEvent) SoftAssertions(org.assertj.core.api.SoftAssertions) TestFactory(org.junit.jupiter.api.TestFactory) Loan(com.github.robozonky.api.remote.entities.sanitized.Loan) InvestmentDelegatedEvent(com.github.robozonky.api.notifications.InvestmentDelegatedEvent) SellingCompletedEvent(com.github.robozonky.api.notifications.SellingCompletedEvent) AfterAll(org.junit.jupiter.api.AfterAll) BigDecimal(java.math.BigDecimal) SellingStartedEvent(com.github.robozonky.api.notifications.SellingStartedEvent) SessionInfo(com.github.robozonky.api.notifications.SessionInfo) BeforeAll(org.junit.jupiter.api.BeforeAll) DynamicTest.dynamicTest(org.junit.jupiter.api.DynamicTest.dynamicTest) PurchasingStartedEvent(com.github.robozonky.api.notifications.PurchasingStartedEvent) Lifecycle(com.github.robozonky.app.runtime.Lifecycle) Assertions(org.assertj.core.api.Assertions) ShutdownHook(com.github.robozonky.app.ShutdownHook) InvestmentRejectedEvent(com.github.robozonky.api.notifications.InvestmentRejectedEvent) EventListenerSupplier(com.github.robozonky.api.notifications.EventListenerSupplier) LoanDescriptor(com.github.robozonky.api.strategies.LoanDescriptor) PurchasingCompletedEvent(com.github.robozonky.api.notifications.PurchasingCompletedEvent) InvestmentPurchasedEvent(com.github.robozonky.api.notifications.InvestmentPurchasedEvent) Event(com.github.robozonky.api.notifications.Event) Consumer(java.util.function.Consumer) Test(org.junit.jupiter.api.Test) Mockito(org.mockito.Mockito) MarketplaceLoan(com.github.robozonky.api.remote.entities.sanitized.MarketplaceLoan) Stream(java.util.stream.Stream) PortfolioOverview(com.github.robozonky.api.strategies.PortfolioOverview) EventListener(com.github.robozonky.api.notifications.EventListener) SaleOfferedEvent(com.github.robozonky.api.notifications.SaleOfferedEvent) Investment(com.github.robozonky.api.remote.entities.sanitized.Investment) DynamicTest(org.junit.jupiter.api.DynamicTest) Optional(java.util.Optional) ReturnCode(com.github.robozonky.api.ReturnCode) InvestmentMadeEvent(com.github.robozonky.api.notifications.InvestmentMadeEvent) RoboZonkyEndingEvent(com.github.robozonky.api.notifications.RoboZonkyEndingEvent) AbstractRoboZonkyTest(com.github.robozonky.test.AbstractRoboZonkyTest) Collections(java.util.Collections) RecommendedLoan(com.github.robozonky.api.strategies.RecommendedLoan) Loan(com.github.robozonky.api.remote.entities.sanitized.Loan) MarketplaceLoan(com.github.robozonky.api.remote.entities.sanitized.MarketplaceLoan) SoftAssertions(org.assertj.core.api.SoftAssertions) ExecutionCompletedEvent(com.github.robozonky.api.notifications.ExecutionCompletedEvent) InvestmentDelegatedEvent(com.github.robozonky.api.notifications.InvestmentDelegatedEvent) SellingCompletedEvent(com.github.robozonky.api.notifications.SellingCompletedEvent) SellingStartedEvent(com.github.robozonky.api.notifications.SellingStartedEvent) PurchasingStartedEvent(com.github.robozonky.api.notifications.PurchasingStartedEvent) InvestmentRejectedEvent(com.github.robozonky.api.notifications.InvestmentRejectedEvent) PurchasingCompletedEvent(com.github.robozonky.api.notifications.PurchasingCompletedEvent) InvestmentPurchasedEvent(com.github.robozonky.api.notifications.InvestmentPurchasedEvent) Event(com.github.robozonky.api.notifications.Event) SaleOfferedEvent(com.github.robozonky.api.notifications.SaleOfferedEvent) InvestmentMadeEvent(com.github.robozonky.api.notifications.InvestmentMadeEvent) RoboZonkyEndingEvent(com.github.robozonky.api.notifications.RoboZonkyEndingEvent) Stream(java.util.stream.Stream) Investment(com.github.robozonky.api.remote.entities.sanitized.Investment) PortfolioOverview(com.github.robozonky.api.strategies.PortfolioOverview) InvestmentMadeEvent(com.github.robozonky.api.notifications.InvestmentMadeEvent)

Example 19 with Event

use of com.github.robozonky.api.notifications.Event in project robozonky by RoboZonky.

the class JmxListenerServiceTest method getParametersForInvestmentPurchased.

private DynamicTest getParametersForInvestmentPurchased() {
    final Loan l = mockLoan();
    final Investment i = Investment.fresh((MarketplaceLoan) l, 200);
    final Event evt = new InvestmentPurchasedEvent(i, l, PortfolioOverview.calculate(BigDecimal.valueOf(2000), Stream::empty));
    final Consumer<SoftAssertions> before = (softly) -> {
        final OperationsMBean mbean = getOperationsMBean();
        softly.assertThat(mbean.getPurchasedInvestments()).isEmpty();
    };
    final Consumer<SoftAssertions> after = (softly) -> {
        final OperationsMBean mbean = getOperationsMBean();
        softly.assertThat(mbean.getPurchasedInvestments()).containsOnlyKeys(i.getLoanId());
        softly.assertThat(mbean.getLatestUpdatedDateTime()).isEqualTo(evt.getCreatedOn());
    };
    return getParameters(evt, before, after);
}
Also used : RecommendedLoan(com.github.robozonky.api.strategies.RecommendedLoan) ExecutionCompletedEvent(com.github.robozonky.api.notifications.ExecutionCompletedEvent) SoftAssertions(org.assertj.core.api.SoftAssertions) TestFactory(org.junit.jupiter.api.TestFactory) Loan(com.github.robozonky.api.remote.entities.sanitized.Loan) InvestmentDelegatedEvent(com.github.robozonky.api.notifications.InvestmentDelegatedEvent) SellingCompletedEvent(com.github.robozonky.api.notifications.SellingCompletedEvent) AfterAll(org.junit.jupiter.api.AfterAll) BigDecimal(java.math.BigDecimal) SellingStartedEvent(com.github.robozonky.api.notifications.SellingStartedEvent) SessionInfo(com.github.robozonky.api.notifications.SessionInfo) BeforeAll(org.junit.jupiter.api.BeforeAll) DynamicTest.dynamicTest(org.junit.jupiter.api.DynamicTest.dynamicTest) PurchasingStartedEvent(com.github.robozonky.api.notifications.PurchasingStartedEvent) Lifecycle(com.github.robozonky.app.runtime.Lifecycle) Assertions(org.assertj.core.api.Assertions) ShutdownHook(com.github.robozonky.app.ShutdownHook) InvestmentRejectedEvent(com.github.robozonky.api.notifications.InvestmentRejectedEvent) EventListenerSupplier(com.github.robozonky.api.notifications.EventListenerSupplier) LoanDescriptor(com.github.robozonky.api.strategies.LoanDescriptor) PurchasingCompletedEvent(com.github.robozonky.api.notifications.PurchasingCompletedEvent) InvestmentPurchasedEvent(com.github.robozonky.api.notifications.InvestmentPurchasedEvent) Event(com.github.robozonky.api.notifications.Event) Consumer(java.util.function.Consumer) Test(org.junit.jupiter.api.Test) Mockito(org.mockito.Mockito) MarketplaceLoan(com.github.robozonky.api.remote.entities.sanitized.MarketplaceLoan) Stream(java.util.stream.Stream) PortfolioOverview(com.github.robozonky.api.strategies.PortfolioOverview) EventListener(com.github.robozonky.api.notifications.EventListener) SaleOfferedEvent(com.github.robozonky.api.notifications.SaleOfferedEvent) Investment(com.github.robozonky.api.remote.entities.sanitized.Investment) DynamicTest(org.junit.jupiter.api.DynamicTest) Optional(java.util.Optional) ReturnCode(com.github.robozonky.api.ReturnCode) InvestmentMadeEvent(com.github.robozonky.api.notifications.InvestmentMadeEvent) RoboZonkyEndingEvent(com.github.robozonky.api.notifications.RoboZonkyEndingEvent) AbstractRoboZonkyTest(com.github.robozonky.test.AbstractRoboZonkyTest) Collections(java.util.Collections) RecommendedLoan(com.github.robozonky.api.strategies.RecommendedLoan) Loan(com.github.robozonky.api.remote.entities.sanitized.Loan) MarketplaceLoan(com.github.robozonky.api.remote.entities.sanitized.MarketplaceLoan) SoftAssertions(org.assertj.core.api.SoftAssertions) ExecutionCompletedEvent(com.github.robozonky.api.notifications.ExecutionCompletedEvent) InvestmentDelegatedEvent(com.github.robozonky.api.notifications.InvestmentDelegatedEvent) SellingCompletedEvent(com.github.robozonky.api.notifications.SellingCompletedEvent) SellingStartedEvent(com.github.robozonky.api.notifications.SellingStartedEvent) PurchasingStartedEvent(com.github.robozonky.api.notifications.PurchasingStartedEvent) InvestmentRejectedEvent(com.github.robozonky.api.notifications.InvestmentRejectedEvent) PurchasingCompletedEvent(com.github.robozonky.api.notifications.PurchasingCompletedEvent) InvestmentPurchasedEvent(com.github.robozonky.api.notifications.InvestmentPurchasedEvent) Event(com.github.robozonky.api.notifications.Event) SaleOfferedEvent(com.github.robozonky.api.notifications.SaleOfferedEvent) InvestmentMadeEvent(com.github.robozonky.api.notifications.InvestmentMadeEvent) RoboZonkyEndingEvent(com.github.robozonky.api.notifications.RoboZonkyEndingEvent) InvestmentPurchasedEvent(com.github.robozonky.api.notifications.InvestmentPurchasedEvent) Investment(com.github.robozonky.api.remote.entities.sanitized.Investment)

Example 20 with Event

use of com.github.robozonky.api.notifications.Event in project robozonky by RoboZonky.

the class SellingTest method saleMade.

private void saleMade(final boolean isDryRun) {
    final Investment i = mockInvestment();
    final Zonky zonky = mockApi();
    final Portfolio portfolio = new Portfolio(Collections.singleton(i), mockBalance(zonky));
    new Selling(ALL_ACCEPTING, isDryRun).accept(portfolio, mockAuthentication(zonky));
    final List<Event> e = getNewEvents();
    assertThat(e).hasSize(5);
    assertSoftly(softly -> {
        softly.assertThat(e.get(0)).isInstanceOf(SellingStartedEvent.class);
        softly.assertThat(e.get(1)).isInstanceOf(SaleRecommendedEvent.class);
        softly.assertThat(e.get(2)).isInstanceOf(SaleRequestedEvent.class);
        softly.assertThat(e.get(3)).isInstanceOf(SaleOfferedEvent.class);
        softly.assertThat(e.get(4)).isInstanceOf(SellingCompletedEvent.class);
    });
    final VerificationMode m = isDryRun ? never() : times(1);
    assertThat(i.isOnSmp()).isTrue();
    verify(zonky, m).sell(argThat(inv -> i.getLoanId() == inv.getLoanId()));
}
Also used : InvestmentStatus(com.github.robozonky.api.remote.enums.InvestmentStatus) SaleRecommendedEvent(com.github.robozonky.api.notifications.SaleRecommendedEvent) SoftAssertions(org.assertj.core.api.SoftAssertions) Loan(com.github.robozonky.api.remote.entities.sanitized.Loan) Wallet(com.github.robozonky.api.remote.entities.Wallet) Zonky(com.github.robozonky.common.remote.Zonky) Supplier(java.util.function.Supplier) SaleRequestedEvent(com.github.robozonky.api.notifications.SaleRequestedEvent) Event(com.github.robozonky.api.notifications.Event) SellingCompletedEvent(com.github.robozonky.api.notifications.SellingCompletedEvent) Test(org.junit.jupiter.api.Test) VerificationMode(org.mockito.verification.VerificationMode) BigDecimal(java.math.BigDecimal) SellingStartedEvent(com.github.robozonky.api.notifications.SellingStartedEvent) Mockito(org.mockito.Mockito) List(java.util.List) Stream(java.util.stream.Stream) SaleOfferedEvent(com.github.robozonky.api.notifications.SaleOfferedEvent) Investment(com.github.robozonky.api.remote.entities.sanitized.Investment) Optional(java.util.Optional) Assertions(org.assertj.core.api.Assertions) AbstractZonkyLeveragingTest(com.github.robozonky.app.AbstractZonkyLeveragingTest) Collections(java.util.Collections) SellStrategy(com.github.robozonky.api.strategies.SellStrategy) SaleRecommendedEvent(com.github.robozonky.api.notifications.SaleRecommendedEvent) SaleRequestedEvent(com.github.robozonky.api.notifications.SaleRequestedEvent) Event(com.github.robozonky.api.notifications.Event) SellingCompletedEvent(com.github.robozonky.api.notifications.SellingCompletedEvent) SellingStartedEvent(com.github.robozonky.api.notifications.SellingStartedEvent) SaleOfferedEvent(com.github.robozonky.api.notifications.SaleOfferedEvent) VerificationMode(org.mockito.verification.VerificationMode) Investment(com.github.robozonky.api.remote.entities.sanitized.Investment) Zonky(com.github.robozonky.common.remote.Zonky)

Aggregations

Event (com.github.robozonky.api.notifications.Event)26 Test (org.junit.jupiter.api.Test)23 AbstractZonkyLeveragingTest (com.github.robozonky.app.AbstractZonkyLeveragingTest)18 Zonky (com.github.robozonky.common.remote.Zonky)17 ExecutionCompletedEvent (com.github.robozonky.api.notifications.ExecutionCompletedEvent)15 InvestmentDelegatedEvent (com.github.robozonky.api.notifications.InvestmentDelegatedEvent)15 InvestmentMadeEvent (com.github.robozonky.api.notifications.InvestmentMadeEvent)15 InvestmentRejectedEvent (com.github.robozonky.api.notifications.InvestmentRejectedEvent)15 Portfolio (com.github.robozonky.app.portfolio.Portfolio)15 RecommendedLoan (com.github.robozonky.api.strategies.RecommendedLoan)14 Investment (com.github.robozonky.api.remote.entities.sanitized.Investment)13 Authenticated (com.github.robozonky.app.authentication.Authenticated)12 Loan (com.github.robozonky.api.remote.entities.sanitized.Loan)11 LoanDescriptor (com.github.robozonky.api.strategies.LoanDescriptor)11 ExecutionStartedEvent (com.github.robozonky.api.notifications.ExecutionStartedEvent)10 InvestmentPurchasedEvent (com.github.robozonky.api.notifications.InvestmentPurchasedEvent)10 PurchasingCompletedEvent (com.github.robozonky.api.notifications.PurchasingCompletedEvent)10 PurchasingStartedEvent (com.github.robozonky.api.notifications.PurchasingStartedEvent)10 Collections (java.util.Collections)10 Optional (java.util.Optional)10