@Test public void test_getCalculationAssetDetails() { final List<CalculationAssetDetails> expectedCalculationAssetDetails = getCalculationAssetDetailList(); when(jdbcTemplate.query(any(String.class), any(CalculationAssetDetailsRowMapper.class))) .thenReturn(expectedCalculationAssetDetails); final List<CalculationAssetDetails> actualCalculationAssetDetails = depreciationRepository .getCalculationAssetDetails(getDepreciationCriteria()); assertEquals(expectedCalculationAssetDetails.toString(), actualCalculationAssetDetails.toString()); }
public List<CalculationAssetDetails> getCalculationAssetDetails(final DepreciationCriteria depreciationCriteria) { final String sql = depreciationQueryBuilder.getCalculationAssetDetailsQuery(depreciationCriteria); log.debug("the CalculationAssetDetails query-- " + sql); return jdbcTemplate.query(sql, calculationAssetDetailsRowMapper); }
DepreciationRepository { public List<CalculationAssetDetails> getCalculationAssetDetails(final DepreciationCriteria depreciationCriteria) { final String sql = depreciationQueryBuilder.getCalculationAssetDetailsQuery(depreciationCriteria); log.debug("the CalculationAssetDetails query-- " + sql); return jdbcTemplate.query(sql, calculationAssetDetailsRowMapper); } }
DepreciationRepository { public List<CalculationAssetDetails> getCalculationAssetDetails(final DepreciationCriteria depreciationCriteria) { final String sql = depreciationQueryBuilder.getCalculationAssetDetailsQuery(depreciationCriteria); log.debug("the CalculationAssetDetails query-- " + sql); return jdbcTemplate.query(sql, calculationAssetDetailsRowMapper); }  }
DepreciationRepository { public List<CalculationAssetDetails> getCalculationAssetDetails(final DepreciationCriteria depreciationCriteria) { final String sql = depreciationQueryBuilder.getCalculationAssetDetailsQuery(depreciationCriteria); log.debug("the CalculationAssetDetails query-- " + sql); return jdbcTemplate.query(sql, calculationAssetDetailsRowMapper); }  List<DepreciationDetail> getDepreciationdetails(final DepreciationCriteria depreciationCriteria); void persistDepreciation(final Depreciation depreciation); Map<Long, BigDecimal> getdepreciationSum(final String tenantId); List<CalculationAssetDetails> getCalculationAssetDetails(final DepreciationCriteria depreciationCriteria); List<CalculationCurrentValue> getCalculationCurrentvalue(final DepreciationCriteria depreciationCriteria); List<DepreciationReportCriteria> getDepreciatedAsset(final DepreciationReportCriteria depreciationReportCriteria); List<DepreciationInputs> getDepreciationInputs(final DepreciationCriteria depreciationCriteria); }
DepreciationRepository { public List<CalculationAssetDetails> getCalculationAssetDetails(final DepreciationCriteria depreciationCriteria) { final String sql = depreciationQueryBuilder.getCalculationAssetDetailsQuery(depreciationCriteria); log.debug("the CalculationAssetDetails query-- " + sql); return jdbcTemplate.query(sql, calculationAssetDetailsRowMapper); }  List<DepreciationDetail> getDepreciationdetails(final DepreciationCriteria depreciationCriteria); void persistDepreciation(final Depreciation depreciation); Map<Long, BigDecimal> getdepreciationSum(final String tenantId); List<CalculationAssetDetails> getCalculationAssetDetails(final DepreciationCriteria depreciationCriteria); List<CalculationCurrentValue> getCalculationCurrentvalue(final DepreciationCriteria depreciationCriteria); List<DepreciationReportCriteria> getDepreciatedAsset(final DepreciationReportCriteria depreciationReportCriteria); List<DepreciationInputs> getDepreciationInputs(final DepreciationCriteria depreciationCriteria);  }