public void setRefundIdForPrepaid(RefundReturnRequest refundReturnRequest) {
if(StringUtils.isBlank (refundReturnRequest.getRefundRequest().getRefundId())) {
refundReturnRequest.getRefundRequest().setRefundId (Integer.toString(ThreadLocalRandom.current().nextInt(999999999)));
}
}
CodePudding user response:
you can test the RefundReturnRequest refundReturnRequest
after the method executed.
@Test
void testSetRefundIdForPrepaid(){
//build param
RefundReturnRequest refundReturnRequest = new RefundReturnRequest();
//executetd
service.setRefundIdForPrepaid(refundReturnRequest);
//test result
assertThat(refundReturnRequest.getRefundRequest().getRefundId()).isEqualTo(xxx);
}
CodePudding user response:
@Test
TestsetRefundIdForPrepaid(){
//test case
}