Search in sources :

Example 1 with OrderItemInvoiceItemLinkRepository

use of org.estatio.module.capex.dom.orderinvoice.OrderItemInvoiceItemLinkRepository in project estatio by estatio.

the class OrderItem_Test method setupOrderItemInvoiceItemLinkRepository.

private OrderItemInvoiceItemLinkRepository setupOrderItemInvoiceItemLinkRepository(final IncomingInvoiceItem item1, final IncomingInvoiceItem item2) {
    OrderItemInvoiceItemLink link1 = new OrderItemInvoiceItemLink();
    OrderItemInvoiceItemLink link2 = new OrderItemInvoiceItemLink();
    link1.setInvoiceItem(item1);
    link1.setNetAmount(item1.getNetAmount());
    link2.setInvoiceItem(item2);
    link2.setNetAmount(item2.getNetAmount());
    OrderItemInvoiceItemLinkRepository orderItemInvoiceItemLinkRepository = new OrderItemInvoiceItemLinkRepository() {

        @Override
        public List<OrderItemInvoiceItemLink> findByOrderItem(final OrderItem orderItem) {
            return Arrays.asList(link1, link2);
        }
    };
    return orderItemInvoiceItemLinkRepository;
}
Also used : OrderItemInvoiceItemLinkRepository(org.estatio.module.capex.dom.orderinvoice.OrderItemInvoiceItemLinkRepository) OrderItemInvoiceItemLink(org.estatio.module.capex.dom.orderinvoice.OrderItemInvoiceItemLink)

Aggregations

OrderItemInvoiceItemLink (org.estatio.module.capex.dom.orderinvoice.OrderItemInvoiceItemLink)1 OrderItemInvoiceItemLinkRepository (org.estatio.module.capex.dom.orderinvoice.OrderItemInvoiceItemLinkRepository)1