如何在Spring Boot中为Rest API编写Mockito测试用例?

时间:2019-05-22 10:55:09

标签: spring junit mockito

 @RequestMapping(value = "/v0.1/getFySectionDetails", method = RequestMethod.POST)
 public ResponseEntity<?> getFyMonthlyPurchases(@RequestBody GstServicesRequestModel gstServicesRequestModel) {
  String gstin = gstServicesRequestModel.getGstin();
  BigInteger reportId = gstServicesRequestModel.getReportId();
  logger.info("Gstin, ReportID : "+gstin+", "+reportId);
  CalculationsVO calculationsVo = gstr1DataHandler.getFySectionDetails(gstin, reportId, null, null, null, null, null, null);
   return new ResponseEntity<CalculationsVO>(calculationsVo, HttpStatus.OK);
    }

0 个答案:

没有答案