Codota Logo
Participation.getRemainingInstalmentCount
Code IndexAdd Codota to your IDE (free)

How to use
getRemainingInstalmentCount
method
in
com.github.robozonky.api.remote.entities.Participation

Best Java code snippets using com.github.robozonky.api.remote.entities.Participation.getRemainingInstalmentCount (Showing top 8 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Connection c =
  • Codota IconDataSource dataSource;dataSource.getConnection()
  • Codota IconString url;DriverManager.getConnection(url)
  • Codota IconIdentityDatabaseUtil.getDBConnection()
  • Smart code suggestions by Codota
}
origin: com.github.robozonky/robozonky-strategy-natural

@Override
public int getRemainingTermInMonths() {
  return participation.getRemainingInstalmentCount();
}
origin: RoboZonky/robozonky

@Override
public int getRemainingTermInMonths() {
  return participation.getRemainingInstalmentCount();
}
origin: RoboZonky/robozonky

private static ParticipationDescriptor mockParticipationDescriptor(final Loan loan) {
  final Participation p = mock(Participation.class);
  doReturn(loan.getTermInMonths()).when(p).getRemainingInstalmentCount();
  return new ParticipationDescriptor(p, () -> loan);
}
origin: RoboZonky/robozonky

private static ParticipationDescriptor mockParticipationDescriptor(final Loan loan,
                                  final int remainingInstalments,
                                  final OffsetDateTime deadline) {
  final Participation p = mock(Participation.class);
  when(p.getRemainingInstalmentCount()).thenReturn(remainingInstalments);
  when(p.getDeadline()).thenReturn(deadline);
  when(p.getRemainingPrincipal()).thenReturn(BigDecimal.valueOf(loan.getAmount()));
  return new ParticipationDescriptor(p, () -> loan);
}
origin: com.github.robozonky/robozonky-api

static Investment fresh(final Participation participation, final Loan loan, final BigDecimal amount) {
  return Investment.fresh(loan, amount)
      .setId(participation.getInvestmentId())
      .setRemainingMonths(participation.getRemainingInstalmentCount())
      .setInvestmentDate(DateUtil.offsetNow())
      .build();
}
origin: RoboZonky/robozonky

static Investment fresh(final Participation participation, final Loan loan, final BigDecimal amount) {
  return Investment.fresh(loan, amount)
      .setId(participation.getInvestmentId())
      .setRemainingMonths(participation.getRemainingInstalmentCount())
      .setInvestmentDate(DateUtil.offsetNow())
      .build();
}
origin: RoboZonky/robozonky

@Test
@DisplayName("Fresh from Participation works.")
void freshFromParticipation() {
  final Loan l = Loan.custom().build();
  final Participation p = mock(Participation.class);
  when(p.getInvestmentId()).thenReturn(1L);
  when(p.getRemainingInstalmentCount()).thenReturn(2);
  final Investment i = Investment.fresh(p, l, BigDecimal.valueOf(1000));
  assertSoftly(softly -> {
    softly.assertThat(i.getRemainingPrincipal()).isEqualTo(BigDecimal.valueOf(1000));
    softly.assertThat(i.getId()).isEqualTo(p.getInvestmentId());
    softly.assertThat(i.getRemainingMonths()).isEqualTo(p.getRemainingInstalmentCount());
    softly.assertThat(i.getInvestmentDate()).isBeforeOrEqualTo(OffsetDateTime.now());
  });
}
origin: RoboZonky/robozonky

@Test
void values() {
  final ParticipationDescriptor original = new ParticipationDescriptor(PARTICIPATION, () -> LOAN);
  final Wrapper<ParticipationDescriptor> w = Wrapper.wrap(original);
  assertSoftly(softly -> {
    softly.assertThat(w.isInsuranceActive()).isEqualTo(PARTICIPATION.isInsuranceActive());
    softly.assertThat(w.getInterestRate()).isEqualTo(PARTICIPATION.getInterestRate());
    softly.assertThat(w.getRegion()).isEqualTo(LOAN.getRegion());
    softly.assertThat(w.getRating()).isEqualTo(PARTICIPATION.getRating());
    softly.assertThat(w.getMainIncomeType()).isEqualTo(LOAN.getMainIncomeType());
    softly.assertThat(w.getPurpose()).isEqualTo(LOAN.getPurpose());
    softly.assertThat(w.getOriginalAmount()).isEqualTo(LOAN.getAmount());
    softly.assertThat(w.getRemainingPrincipal()).isEqualTo(PARTICIPATION.getRemainingPrincipal());
    softly.assertThat(w.getOriginal()).isSameAs(original);
    softly.assertThat(w.getStory()).isEqualTo(LOAN.getStory());
    softly.assertThat(w.getOriginalTermInMonths()).isEqualTo(PARTICIPATION.getOriginalInstalmentCount());
    softly.assertThat(w.getRemainingTermInMonths()).isEqualTo(PARTICIPATION.getRemainingInstalmentCount());
    softly.assertThat(w.toString()).isNotNull();
  });
}
com.github.robozonky.api.remote.entitiesParticipationgetRemainingInstalmentCount

Popular methods of Participation

  • getRemainingPrincipal
  • getId
  • getLoanId
  • getIncomeType
  • getInterestRate
  • getInvestmentId
  • getOriginalInstalmentCount
  • getPurpose
  • getRating
  • isInsuranceActive
  • getDeadline
  • isWillExceedLoanInvestmentLimit
  • getDeadline,
  • isWillExceedLoanInvestmentLimit

Popular in Java

  • Making http requests using okhttp
  • getSharedPreferences (Context)
  • putExtra (Intent)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate(i
  • KeyStore (java.security)
    This class represents an in-memory collection of keys and certificates. It manages two types of entr
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Dictionary (java.util)
    The Dictionary class is the abstract parent of any class, such as Hashtable, which maps keys to valu
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now