Search in sources :

Example 1 with PaymentStatuses

use of com.github.robozonky.api.remote.enums.PaymentStatuses in project robozonky by RoboZonky.

the class PortfolioTest method getActiveWithPaymentStatus.

@Test
void getActiveWithPaymentStatus() {
    final Investment i = mockInvestment(PaymentStatus.OK);
    final Investment i2 = mockInvestment(PaymentStatus.DUE);
    // ignored because not interested
    final Investment i3 = mockInvestment(PaymentStatus.WRITTEN_OFF);
    // ignored because sold
    final Investment i4 = mockSold();
    final Portfolio instance = new Portfolio(Arrays.asList(i, i2, i3, i4), null);
    final PaymentStatuses p = PaymentStatuses.of(PaymentStatus.OK, PaymentStatus.DUE);
    assertThat(instance.getActiveWithPaymentStatus(p)).containsExactly(i, i2);
}
Also used : PaymentStatuses(com.github.robozonky.api.remote.enums.PaymentStatuses) Investment(com.github.robozonky.api.remote.entities.sanitized.Investment) Test(org.junit.jupiter.api.Test) AbstractZonkyLeveragingTest(com.github.robozonky.app.AbstractZonkyLeveragingTest)

Aggregations

Investment (com.github.robozonky.api.remote.entities.sanitized.Investment)1 PaymentStatuses (com.github.robozonky.api.remote.enums.PaymentStatuses)1 AbstractZonkyLeveragingTest (com.github.robozonky.app.AbstractZonkyLeveragingTest)1 Test (org.junit.jupiter.api.Test)1