public void fill (final @Nonnull Accounting accounting) { final CustomerRegistry customerRegistry = accounting.getCustomerRegistry(); final ProjectRegistry projectRegistry = accounting.getProjectRegistry(); final InvoiceRegistry invoiceRegistry = accounting.getInvoiceRegistry(); customersXml.forEach(customer -> customerRegistry.addCustomer().with(customer.toBuilder()).create()); projectsXml.forEach(project -> projectRegistry.addProject().with(project.toBuilder(accounting)).create()); invoicesxml.forEach(invoice -> invoiceRegistry.addInvoice().with(invoice.toBuilder(accounting)).create()); } }
.withHourlyRate(getHourlyRate(projectConfig, jobEvents)) .withEvents(jobEvents) .create();
.withNumber("1") .withHourlyRate(new Money(43, "EUR")) .create(); assertThat(p.toString(), is("InMemoryProject(id=2, customer=InMemoryCustomer(id=1, name=Acme Corp., billingAddress=" + "Address(street=Foo Bar rd 20, city=San Francisco, state=CA, country=USA, zip=12345), "
.withHourlyRate(rate1) .withBudget(new Money(123456, "EUR")) .create(); final Project acmeConsultingProject2 = projectRegistry.addProject() .withHourlyRate(rate2) .withBudget(new Money(234567, "EUR")) .create(); final Project acmeFinancingProject1 = projectRegistry.addProject() .withEvents(je3) .withBudget(new Money(345678, "EUR")) .create(); final Project acmeFinancingProject2 = projectRegistry.addProject() .withEvents(je4) .withBudget(new Money(456789, "EUR")) .create();