@Test public final void test_search() { List<InstrumentType> instrumentTypes = getInstrumentTypes(); InstrumentTypeSearch instrumentTypeSearch = new InstrumentTypeSearch(); Pagination<InstrumentType> expextedResult = new Pagination<>(); expextedResult.setPagedData(instrumentTypes); when(instrumentTypeRepository.search(instrumentTypeSearch)).thenReturn(expextedResult); Pagination<InstrumentType> actualResult = instrumentTypeService.search(instrumentTypeSearch); assertEquals(expextedResult, actualResult); }
public Pagination<InstrumentType> search(InstrumentTypeSearch instrumentTypeSearch) { return instrumentTypeRepository.search(instrumentTypeSearch); }
InstrumentTypeService { public Pagination<InstrumentType> search(InstrumentTypeSearch instrumentTypeSearch) { return instrumentTypeRepository.search(instrumentTypeSearch); } }
InstrumentTypeService { public Pagination<InstrumentType> search(InstrumentTypeSearch instrumentTypeSearch) { return instrumentTypeRepository.search(instrumentTypeSearch); } @Autowired  InstrumentTypeService(SmartValidator validator, InstrumentTypeRepository instrumentTypeRepository); }
InstrumentTypeService { public Pagination<InstrumentType> search(InstrumentTypeSearch instrumentTypeSearch) { return instrumentTypeRepository.search(instrumentTypeSearch); } @Autowired  InstrumentTypeService(SmartValidator validator, InstrumentTypeRepository instrumentTypeRepository); @Transactional List<InstrumentType> create(List<InstrumentType> instrumentTypes, BindingResult errors,
            RequestInfo requestInfo); @Transactional List<InstrumentType> update(List<InstrumentType> instrumentTypes, BindingResult errors,
            RequestInfo requestInfo); @Transactional List<InstrumentType> delete(List<InstrumentType> instrumentTypes, BindingResult errors,
            RequestInfo requestInfo); @Transactional InstrumentType delete(InstrumentType instrumentType); List<InstrumentType> fetchRelated(List<InstrumentType> instrumenttypes); Pagination<InstrumentType> search(InstrumentTypeSearch instrumentTypeSearch); @Transactional InstrumentType save(InstrumentType instrumentType); @Transactional InstrumentType update(InstrumentType instrumentType); }
InstrumentTypeService { public Pagination<InstrumentType> search(InstrumentTypeSearch instrumentTypeSearch) { return instrumentTypeRepository.search(instrumentTypeSearch); } @Autowired  InstrumentTypeService(SmartValidator validator, InstrumentTypeRepository instrumentTypeRepository); @Transactional List<InstrumentType> create(List<InstrumentType> instrumentTypes, BindingResult errors,
            RequestInfo requestInfo); @Transactional List<InstrumentType> update(List<InstrumentType> instrumentTypes, BindingResult errors,
            RequestInfo requestInfo); @Transactional List<InstrumentType> delete(List<InstrumentType> instrumentTypes, BindingResult errors,
            RequestInfo requestInfo); @Transactional InstrumentType delete(InstrumentType instrumentType); List<InstrumentType> fetchRelated(List<InstrumentType> instrumenttypes); Pagination<InstrumentType> search(InstrumentTypeSearch instrumentTypeSearch); @Transactional InstrumentType save(InstrumentType instrumentType); @Transactional InstrumentType update(InstrumentType instrumentType); static final String ACTION_CREATE; static final String ACTION_UPDATE; static final String ACTION_DELETE; static final String ACTION_VIEW; static final String ACTION_EDIT; static final String ACTION_SEARCH; }