@Test public void shouldGetHeaderForEmergencyRnr() throws Exception { mockMessageServiceCalls(); when(messageService.message("requisition.type.emergency")).thenReturn("Emergency"); PdfPTable header = requisitionPdfModel.getRequisitionHeader(); assertRowValues(header.getRow(0), "Report and Requisition for: Yellow Fever (Warehouse)"); assertRowValues(header.getRow(1), "Facility: F1", "Operated By: MOH", "Maximum Stock level: 100", "Emergency Order Point: 50.5"); assertRowValues(header.getRow(2), "Facility Code: F10010", "levelName: Arusha", "parentLevelName: Zambia", "Reporting Period: 01/01/2012 - 01/02/2012", "Requisition Type: Emergency"); assertThat(header.getSpacingAfter(), is(RequisitionPdfModel.PARAGRAPH_SPACING)); }
public PdfPTable getRequisitionHeader() throws DocumentException { PdfPTable table = prepareRequisitionHeaderTable(); addHeading(table); Facility facility = requisition.getFacility(); addFirstLine(facility, table); addSecondLine(facility, table, requisition.isEmergency()); table.setSpacingAfter(PARAGRAPH_SPACING); return table; }
RequisitionPdfModel { public PdfPTable getRequisitionHeader() throws DocumentException { PdfPTable table = prepareRequisitionHeaderTable(); addHeading(table); Facility facility = requisition.getFacility(); addFirstLine(facility, table); addSecondLine(facility, table, requisition.isEmergency()); table.setSpacingAfter(PARAGRAPH_SPACING); return table; } }
RequisitionPdfModel { public PdfPTable getRequisitionHeader() throws DocumentException { PdfPTable table = prepareRequisitionHeaderTable(); addHeading(table); Facility facility = requisition.getFacility(); addFirstLine(facility, table); addSecondLine(facility, table, requisition.isEmergency()); table.setSpacingAfter(PARAGRAPH_SPACING); return table; } RequisitionPdfModel(Map<String, Object> model, MessageService messageService, ConfigurationSettingService configService); }
RequisitionPdfModel { public PdfPTable getRequisitionHeader() throws DocumentException { PdfPTable table = prepareRequisitionHeaderTable(); addHeading(table); Facility facility = requisition.getFacility(); addFirstLine(facility, table); addSecondLine(facility, table, requisition.isEmergency()); table.setSpacingAfter(PARAGRAPH_SPACING); return table; } 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 getRequisitionHeader() throws DocumentException { PdfPTable table = prepareRequisitionHeaderTable(); addHeading(table); Facility facility = requisition.getFacility(); addFirstLine(facility, table); addSecondLine(facility, table, requisition.isEmergency()); table.setSpacingAfter(PARAGRAPH_SPACING); return table; } 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; }