Skip to content

Commit

Permalink
#1045 missing unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
amihaiemil committed Mar 9, 2021
1 parent e33163a commit 19f3071
Showing 1 changed file with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,28 @@ public void hasCorrectId() {
assertThat(invoice.invoiceId(), is(1));
}

/**
* Invoice has the latest Payment.
*/
@Test
public void hasLatestPayment() {
final Payment latest = Mockito.mock(Payment.class);
final Invoice invoice = new StoredInvoice(
1,
Mockito.mock(Contract.class),
LocalDateTime.now(),
latest,
"mihai",
"vlad",
"RO",
"RO",
BigDecimal.valueOf(487),
Mockito.mock(Storage.class)
);
assertThat(invoice.latest(), is(latest));
}


/**
* Invoice has the correct contract id.
*/
Expand Down

0 comments on commit 19f3071

Please sign in to comment.