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);
}
Aggregations