Skip to content

Instantly share code, notes, and snippets.

@mgryszko
Last active October 17, 2020 20:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mgryszko/1ab5a77b9cd72a9aba00c32dbeb8daa7 to your computer and use it in GitHub Desktop.
Save mgryszko/1ab5a77b9cd72a9aba00c32dbeb8daa7 to your computer and use it in GitHub Desktop.
int id = 12345;
BigDecimal amount = new BigDecimal(100);
Customer customer = new Customer(null, null);
@Test
void standardInvoice() {
when(authenticatedCustomerFinder.apply()).thenReturn(customer);
createInvoiceUseCase.create(id, amount);
verify(invoiceRepository.save(new Invoice(id, amount, customer)));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment