use of org.estatio.module.lease.dom.invoicing.comms.InvoiceForLease_attachSupportingDocument in project estatio by estatio.
the class Invoice_DocumentManagement_IntegTest method receiptAttachedToInvoice.
void receiptAttachedToInvoice(final Invoice invoice, final String fileName) throws IOException {
final InvoiceForLease_attachSupportingDocument invoice_attachSupportingDocument = mixin(InvoiceForLease_attachSupportingDocument.class, invoice);
final List<DocumentType> documentTypes = invoice_attachSupportingDocument.choices0$$();
assertThat(documentTypes).hasSize(2);
final DocumentType documentType = documentTypes.get(0);
final List<String> roleNames = invoice_attachSupportingDocument.choices3$$();
assertThat(roleNames).hasSize(1);
final String roleName = roleNames.get(0);
final Blob blob = asBlob(fileName);
wrap(invoice_attachSupportingDocument).$$(documentType, blob, null, roleName);
}
Aggregations