Search in sources :

Example 1 with InvoiceForLease_attachSupportingDocument

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);
}
Also used : Blob(org.apache.isis.applib.value.Blob) InvoiceForLease_attachSupportingDocument(org.estatio.module.lease.dom.invoicing.comms.InvoiceForLease_attachSupportingDocument) DocumentType(org.incode.module.document.dom.impl.types.DocumentType)

Aggregations

Blob (org.apache.isis.applib.value.Blob)1 InvoiceForLease_attachSupportingDocument (org.estatio.module.lease.dom.invoicing.comms.InvoiceForLease_attachSupportingDocument)1 DocumentType (org.incode.module.document.dom.impl.types.DocumentType)1