@Test public void shouldInitRnrEmergencyService() throws Exception { when(mockRequisitionPeriodService.generateNextPeriod(anyString(), any(Date.class))).thenReturn(new Period(new DateTime(), new DateTime())); rnrFormRepository.programCode = "MMIA"; rnrFormRepository.initEmergencyRnrForm(null, Collections.EMPTY_LIST); verify(mockRequisitionPeriodService).generateNextPeriod(rnrFormRepository.programCode, null); }
public RnRForm initEmergencyRnrForm(Date periodEndDate, List<StockCard> stockCards) throws LMISException { RnRForm rnRForm = initRnRForm(periodEndDate, RnRForm.Emergency.Yes); rnRForm.setRnrFormItemListWrapper(generateRnrFormItems(rnRForm, stockCards)); return rnRForm; }
RnrFormRepository { public RnRForm initEmergencyRnrForm(Date periodEndDate, List<StockCard> stockCards) throws LMISException { RnRForm rnRForm = initRnRForm(periodEndDate, RnRForm.Emergency.Yes); rnRForm.setRnrFormItemListWrapper(generateRnrFormItems(rnRForm, stockCards)); return rnRForm; } }
RnrFormRepository { public RnRForm initEmergencyRnrForm(Date periodEndDate, List<StockCard> stockCards) throws LMISException { RnRForm rnRForm = initRnRForm(periodEndDate, RnRForm.Emergency.Yes); rnRForm.setRnrFormItemListWrapper(generateRnrFormItems(rnRForm, stockCards)); return rnRForm; } @Inject  RnrFormRepository(Context context); }
RnrFormRepository { public RnRForm initEmergencyRnrForm(Date periodEndDate, List<StockCard> stockCards) throws LMISException { RnRForm rnRForm = initRnRForm(periodEndDate, RnRForm.Emergency.Yes); rnRForm.setRnrFormItemListWrapper(generateRnrFormItems(rnRForm, stockCards)); return rnRForm; } @Inject  RnrFormRepository(Context context); RnRForm initNormalRnrForm(Date periodEndDate); RnRForm initEmergencyRnrForm(Date periodEndDate, List<StockCard> stockCards); void create(RnRForm rnRForm); void createRnRsWithItems(final List<RnRForm> forms); void createOrUpdateWithItems(final RnRForm form); boolean isPeriodUnique(final RnRForm form); List<RnRForm> list(); List<RnRForm> listInclude(RnRForm.Emergency includeEmergency, String programCode); List<RnRForm> listInclude(RnRForm.Emergency includeEmergency, String programCode, ReportTypeForm reportTypeForm); List<RnRForm> queryAllUnsyncedForms(); RnRForm queryUnAuthorized(); RnRForm queryRnRForm(final long id); List<RnrFormItem> generateRnrFormItems(final RnRForm form, List<StockCard> stockCards); void removeRnrForm(RnRForm form); boolean hasRequisitionData(); boolean hasOldDate(); List<RnRForm> listNotSynchronizedFromReportStartTime(String programCode); void createAndRefresh(RnRForm rnRForm); void deleteOldData(); void deleteRnrFormDirtyData(List<String> productCodeList); }
RnrFormRepository { public RnRForm initEmergencyRnrForm(Date periodEndDate, List<StockCard> stockCards) throws LMISException { RnRForm rnRForm = initRnRForm(periodEndDate, RnRForm.Emergency.Yes); rnRForm.setRnrFormItemListWrapper(generateRnrFormItems(rnRForm, stockCards)); return rnRForm; } @Inject  RnrFormRepository(Context context); RnRForm initNormalRnrForm(Date periodEndDate); RnRForm initEmergencyRnrForm(Date periodEndDate, List<StockCard> stockCards); void create(RnRForm rnRForm); void createRnRsWithItems(final List<RnRForm> forms); void createOrUpdateWithItems(final RnRForm form); boolean isPeriodUnique(final RnRForm form); List<RnRForm> list(); List<RnRForm> listInclude(RnRForm.Emergency includeEmergency, String programCode); List<RnRForm> listInclude(RnRForm.Emergency includeEmergency, String programCode, ReportTypeForm reportTypeForm); List<RnRForm> queryAllUnsyncedForms(); RnRForm queryUnAuthorized(); RnRForm queryRnRForm(final long id); List<RnrFormItem> generateRnrFormItems(final RnRForm form, List<StockCard> stockCards); void removeRnrForm(RnRForm form); boolean hasRequisitionData(); boolean hasOldDate(); List<RnRForm> listNotSynchronizedFromReportStartTime(String programCode); void createAndRefresh(RnRForm rnRForm); void deleteOldData(); void deleteRnrFormDirtyData(List<String> productCodeList); @Inject
    public StockMovementRepository stockMovementRepository; }