@Test public void shouldSaveRequisitionGroup() { repository.insert(requisitionGroup); verify(mapper).insert(requisitionGroup); }
public void insert(RequisitionGroup requisitionGroup) { try { mapper.insert(requisitionGroup); } catch (DuplicateKeyException ex) { throw new DataException("error.duplicate.code.requisition.group"); } }
RequisitionGroupRepository { public void insert(RequisitionGroup requisitionGroup) { try { mapper.insert(requisitionGroup); } catch (DuplicateKeyException ex) { throw new DataException("error.duplicate.code.requisition.group"); } } }
RequisitionGroupRepository { public void insert(RequisitionGroup requisitionGroup) { try { mapper.insert(requisitionGroup); } catch (DuplicateKeyException ex) { throw new DataException("error.duplicate.code.requisition.group"); } } @Autowired  RequisitionGroupRepository(RequisitionGroupMapper requisitionGroupMapper, CommaSeparator commaSeparator); }
RequisitionGroupRepository { public void insert(RequisitionGroup requisitionGroup) { try { mapper.insert(requisitionGroup); } catch (DuplicateKeyException ex) { throw new DataException("error.duplicate.code.requisition.group"); } } @Autowired  RequisitionGroupRepository(RequisitionGroupMapper requisitionGroupMapper, CommaSeparator commaSeparator); void insert(RequisitionGroup requisitionGroup); List<RequisitionGroup> getRequisitionGroups(List<SupervisoryNode> supervisoryNodes); RequisitionGroup getRequisitionGroupForProgramAndFacility(Program program, Facility facility); RequisitionGroup getByCode(RequisitionGroup requisitionGroup); void update(RequisitionGroup requisitionGroup); List<RequisitionGroup> searchByGroupName(String searchParam, Pagination pagination); List<RequisitionGroup> searchByNodeName(String searchParam, Pagination pagination); Integer getTotalRecordsForSearchOnGroupName(String searchParam); Integer getTotalRecordsForSearchOnNodeName(String searchParam); RequisitionGroup getBy(Long id); }
RequisitionGroupRepository { public void insert(RequisitionGroup requisitionGroup) { try { mapper.insert(requisitionGroup); } catch (DuplicateKeyException ex) { throw new DataException("error.duplicate.code.requisition.group"); } } @Autowired  RequisitionGroupRepository(RequisitionGroupMapper requisitionGroupMapper, CommaSeparator commaSeparator); void insert(RequisitionGroup requisitionGroup); List<RequisitionGroup> getRequisitionGroups(List<SupervisoryNode> supervisoryNodes); RequisitionGroup getRequisitionGroupForProgramAndFacility(Program program, Facility facility); RequisitionGroup getByCode(RequisitionGroup requisitionGroup); void update(RequisitionGroup requisitionGroup); List<RequisitionGroup> searchByGroupName(String searchParam, Pagination pagination); List<RequisitionGroup> searchByNodeName(String searchParam, Pagination pagination); Integer getTotalRecordsForSearchOnGroupName(String searchParam); Integer getTotalRecordsForSearchOnNodeName(String searchParam); RequisitionGroup getBy(Long id);  }