book1.setId(1L);
Item book2 = DatabaseLoader.buildBookItemQuantumThief();
book2.setId(2L);
// TODO Pull this into DatabaseLoader
BigMoney book1UnitPrice = MoneyUtils.parse("GBP 1.23");
BigMoney book1UnitTax = MoneyUtils.parse("GBP 0.20");
BigMoney book2UnitPrice = MoneyUtils.parse("GBP 2.46");
BigMoney book2UnitTax = MoneyUtils.parse("GBP 0.40");
PurchaseOrder stevePurchaseOrder1 = PurchaseOrderBuilder
.newInstance()
.withSupplier(steveUser.getSupplier())
.withPurchaseOrderItem(book1, 1, book1UnitPrice, book1UnitTax)
.withPurchaseOrderItem(book2, 2, book2UnitPrice, book2UnitTax)
.build();
stevePurchaseOrder1.setId(1L);
steveUser.getSupplier().getPurchaseOrders().add(stevePurchaseOrder1);
// Configure Sam Supplier
User samUser = DatabaseLoader.buildSamSupplier(supplierRole);
samUser.setId(1L);
samUser.getSupplier().setId(1L);
// Configure Sam's PurchaseOrder with Items
Item book3 = DatabaseLoader.buildBookItemCompleteWorks();
book3.setId(3L);
Item book4 = DatabaseLoader.buildBookItemPlumbing();
book4.setId(4L);
// TODO Pull this into DatabaseLoader
BigMoney book3UnitPrice = MoneyUtils.parse("GBP 1.23");
BigMoney book3UnitTax = MoneyUtils.parse("GBP 0.20");
BigMoney book4UnitPrice = MoneyUtils.parse("GBP 2.46");
BigMoney book4UnitTax = MoneyUtils.parse("GBP 0.40");
PurchaseOrder samPurchaseOrder1 = PurchaseOrderBuilder
.newInstance()
.withSupplier(samUser.getSupplier())
.withPurchaseOrderItem(book3, 3, book3UnitPrice, book3UnitTax)