@Test public void shouldGetNonFullSupplyLineItems() throws Exception { RnrLineItem lineItem = make(a(RnrLineItemBuilder.defaultRnrLineItem)); requisition.add(lineItem, false); PdfPTable nonFullSupplyTable = requisitionPdfModel.getNonFullSupplyTable(); assertRowValues(nonFullSupplyTable.getRow(0), "Requested Quantity"); assertRowValues(nonFullSupplyTable.getRow(1), " "); assertRowValues(nonFullSupplyTable.getRow(2), "C1"); assertRowValues(nonFullSupplyTable.getRow(3), "6"); assertThat(nonFullSupplyTable.getRows().size(), is(requisition.getNonFullSupplyLineItems().size() + 3)); }
public PdfPTable getNonFullSupplyTable() throws DocumentException, NoSuchFieldException, IllegalAccessException, IOException { List<RnrLineItem> nonFullSupplyLineItems = requisition.getNonFullSupplyLineItems(); Collections.sort(nonFullSupplyLineItems, new LineItemComparator()); if (nonFullSupplyLineItems.size() == 0) return null; return getTableFor(nonFullSupplyLineItems, false, rnrColumnList); }
RequisitionPdfModel { public PdfPTable getNonFullSupplyTable() throws DocumentException, NoSuchFieldException, IllegalAccessException, IOException { List<RnrLineItem> nonFullSupplyLineItems = requisition.getNonFullSupplyLineItems(); Collections.sort(nonFullSupplyLineItems, new LineItemComparator()); if (nonFullSupplyLineItems.size() == 0) return null; return getTableFor(nonFullSupplyLineItems, false, rnrColumnList); } }
RequisitionPdfModel { public PdfPTable getNonFullSupplyTable() throws DocumentException, NoSuchFieldException, IllegalAccessException, IOException { List<RnrLineItem> nonFullSupplyLineItems = requisition.getNonFullSupplyLineItems(); Collections.sort(nonFullSupplyLineItems, new LineItemComparator()); if (nonFullSupplyLineItems.size() == 0) return null; return getTableFor(nonFullSupplyLineItems, false, rnrColumnList); } RequisitionPdfModel(Map<String, Object> model, MessageService messageService, ConfigurationSettingService configService); }
RequisitionPdfModel { public PdfPTable getNonFullSupplyTable() throws DocumentException, NoSuchFieldException, IllegalAccessException, IOException { List<RnrLineItem> nonFullSupplyLineItems = requisition.getNonFullSupplyLineItems(); Collections.sort(nonFullSupplyLineItems, new LineItemComparator()); if (nonFullSupplyLineItems.size() == 0) return null; return getTableFor(nonFullSupplyLineItems, false, rnrColumnList); } RequisitionPdfModel(Map<String, Object> model, MessageService messageService, ConfigurationSettingService configService); Paragraph getFullSupplyHeader(); Paragraph getNonFullSupplyHeader(); PdfPTable getFullSupplyTable(); PdfPTable getRegimenTable(); PdfPTable getNonFullSupplyTable(); PdfPTable getRequisitionHeader(); PdfPTable getSummary(); Money getTotalCost(Rnr requisition); Paragraph getRegimenHeader(); }
RequisitionPdfModel { public PdfPTable getNonFullSupplyTable() throws DocumentException, NoSuchFieldException, IllegalAccessException, IOException { List<RnrLineItem> nonFullSupplyLineItems = requisition.getNonFullSupplyLineItems(); Collections.sort(nonFullSupplyLineItems, new LineItemComparator()); if (nonFullSupplyLineItems.size() == 0) return null; return getTableFor(nonFullSupplyLineItems, false, rnrColumnList); } RequisitionPdfModel(Map<String, Object> model, MessageService messageService, ConfigurationSettingService configService); Paragraph getFullSupplyHeader(); Paragraph getNonFullSupplyHeader(); PdfPTable getFullSupplyTable(); PdfPTable getRegimenTable(); PdfPTable getNonFullSupplyTable(); PdfPTable getRequisitionHeader(); PdfPTable getSummary(); Money getTotalCost(Rnr requisition); Paragraph getRegimenHeader(); static final String LABEL_CURRENCY_SYMBOL; static final float PARAGRAPH_SPACING; static final BaseColor ROW_GREY_BACKGROUND; static final Font H1_FONT; static final SimpleDateFormat DATE_FORMAT; static final int TABLE_SPACING; }