@Test public final void test_search() { List<InstrumentAccountCode> instrumentAccountCodes = getInstrumentAccountCodes(); InstrumentAccountCodeSearch instrumentAccountCodeSearch = new InstrumentAccountCodeSearch(); Pagination<InstrumentAccountCode> expextedResult = new Pagination<>(); expextedResult.setPagedData(instrumentAccountCodes); when(instrumentAccountCodeRepository.search(instrumentAccountCodeSearch)).thenReturn(expextedResult); Pagination<InstrumentAccountCode> actualResult = instrumentAccountCodeService .search(instrumentAccountCodeSearch); assertEquals(expextedResult, actualResult); }
public Pagination<InstrumentAccountCode> search(InstrumentAccountCodeSearch instrumentAccountCodeSearch) { return instrumentAccountCodeRepository.search(instrumentAccountCodeSearch); }
InstrumentAccountCodeService { public Pagination<InstrumentAccountCode> search(InstrumentAccountCodeSearch instrumentAccountCodeSearch) { return instrumentAccountCodeRepository.search(instrumentAccountCodeSearch); } }
InstrumentAccountCodeService { public Pagination<InstrumentAccountCode> search(InstrumentAccountCodeSearch instrumentAccountCodeSearch) { return instrumentAccountCodeRepository.search(instrumentAccountCodeSearch); } @Autowired  InstrumentAccountCodeService(SmartValidator validator,
            InstrumentAccountCodeRepository instrumentAccountCodeRepository,
            ChartOfAccountContractRepository chartOfAccountContractRepository,
            InstrumentTypeRepository instrumentTypeRepository); }
InstrumentAccountCodeService { public Pagination<InstrumentAccountCode> search(InstrumentAccountCodeSearch instrumentAccountCodeSearch) { return instrumentAccountCodeRepository.search(instrumentAccountCodeSearch); } @Autowired  InstrumentAccountCodeService(SmartValidator validator,
            InstrumentAccountCodeRepository instrumentAccountCodeRepository,
            ChartOfAccountContractRepository chartOfAccountContractRepository,
            InstrumentTypeRepository instrumentTypeRepository); @Transactional List<InstrumentAccountCode> create(List<InstrumentAccountCode> instrumentAccountCodes, BindingResult errors,
            RequestInfo requestInfo); @Transactional List<InstrumentAccountCode> update(List<InstrumentAccountCode> instrumentAccountCodes, BindingResult errors,
            RequestInfo requestInfo); @Transactional List<InstrumentAccountCode> delete(List<InstrumentAccountCode> instrumentAccountCodes, BindingResult errors,
            RequestInfo requestInfo); List<InstrumentAccountCode> fetchRelated(List<InstrumentAccountCode> instrumentaccountcodes, RequestInfo requestInfo); @Transactional InstrumentAccountCode delete(InstrumentAccountCode instrumentAccountCode); Pagination<InstrumentAccountCode> search(InstrumentAccountCodeSearch instrumentAccountCodeSearch); @Transactional InstrumentAccountCode save(InstrumentAccountCode instrumentAccountCode); @Transactional InstrumentAccountCode update(InstrumentAccountCode instrumentAccountCode); }
InstrumentAccountCodeService { public Pagination<InstrumentAccountCode> search(InstrumentAccountCodeSearch instrumentAccountCodeSearch) { return instrumentAccountCodeRepository.search(instrumentAccountCodeSearch); } @Autowired  InstrumentAccountCodeService(SmartValidator validator,
            InstrumentAccountCodeRepository instrumentAccountCodeRepository,
            ChartOfAccountContractRepository chartOfAccountContractRepository,
            InstrumentTypeRepository instrumentTypeRepository); @Transactional List<InstrumentAccountCode> create(List<InstrumentAccountCode> instrumentAccountCodes, BindingResult errors,
            RequestInfo requestInfo); @Transactional List<InstrumentAccountCode> update(List<InstrumentAccountCode> instrumentAccountCodes, BindingResult errors,
            RequestInfo requestInfo); @Transactional List<InstrumentAccountCode> delete(List<InstrumentAccountCode> instrumentAccountCodes, BindingResult errors,
            RequestInfo requestInfo); List<InstrumentAccountCode> fetchRelated(List<InstrumentAccountCode> instrumentaccountcodes, RequestInfo requestInfo); @Transactional InstrumentAccountCode delete(InstrumentAccountCode instrumentAccountCode); Pagination<InstrumentAccountCode> search(InstrumentAccountCodeSearch instrumentAccountCodeSearch); @Transactional InstrumentAccountCode save(InstrumentAccountCode instrumentAccountCode); @Transactional InstrumentAccountCode update(InstrumentAccountCode instrumentAccountCode); 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; }