Examples of InvoiceCorrection


Examples of io.fabric8.process.spring.boot.itests.service.invoicing.domain.InvoiceCorrection

    }

    @Test
    public void shouldCreateInvoiceWithCorrections() {
        // Given
        InvoiceCorrection correction = new InvoiceCorrection().netValue(100);
        Invoice invoice = new Invoice().invoiceId("INV-001").addCorrection(correction);

        // When
        URI invoiceUri = restTemplate.postForLocation("http://localhost:8080/invoice", invoice);
        Invoice receivedInvoice = restTemplate.getForObject(invoiceUri, Invoice.class);

        // Then
        assertEquals(1, receivedInvoice.getCorrections().size());
        assertEquals(correction.getNetValue(), receivedInvoice.corrections().get(0).getNetValue());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.