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()); } }
projectRegistry.addProject().withId(projectConfig.getId("uniqueIdentifier")) .withBudget(projectConfig.getMoney("projectEstimate")) .withCustomer(customer)
projectRegistry.addProject() .withId(new Id("" + nextId++)) .withCustomer(acmeConsulting) .create(); final Project acmeConsultingProject2 = projectRegistry.addProject() .withId(new Id("" + nextId++)) .withCustomer(acmeConsulting) .create(); final Project acmeFinancingProject1 = projectRegistry.addProject() .withId(new Id("" + nextId++)) .withCustomer(acmeFinancing) .create(); final Project acmeFinancingProject2 = projectRegistry.addProject() .withId(new Id("" + nextId++)) .withCustomer(acmeFinancing)