test:米阳受托协议支付相关临时test

main
wb2476 2024-07-29 15:31:52 +08:00
parent b09fac340b
commit 446bbb259c
2 changed files with 77 additions and 1 deletions

View File

@ -61,7 +61,7 @@ public class EntPayService {
/**
* 300311-
*/
public EntPayAgrtPayResponse commonAgrtPay(EntPayAgrtPayRequest request) {
public EntPayAgrtPayResponse agrtPay(EntPayAgrtPayRequest request) {
String url = "/entpay/agrt-pay";
HttpResponse<EntPayAgrtPayResponse> httpResponse = apiClient.post(url, HttpHeaders.apiVersionV2(),
request.toJsonRequest(), EntPayAgrtPayResponse.class);

View File

@ -0,0 +1,76 @@
package com.czcb.scfs.api.test.service;
import com.czcb.scfs.api.service.v2.customization.miyang.entpay.EntPayService;
import com.czcb.scfs.api.service.v2.customization.miyang.entpay.model.*;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.test.context.SpringBootTest;
import javax.annotation.Resource;
/**
*
*
* @author H.T
* @since 2024-07-29
*/
@SpringBootTest
class EntPayServiceTest {
private static final Logger log = LoggerFactory.getLogger(EntPayServiceTest.class);
@Resource
private EntPayService service;
@Test
void agrtCreateTest() {
try {
EntPayAgrtCreateResponse response = service.agrtCreate(new EntPayAgrtCreateRequest());
Assertions.assertEquals("000000", response.getRecode());
} catch (Exception e) {
log.info(e.getMessage());
}
}
@Test
void agrtDelTest() {
try {
EntPayAgrtDelResponse response = service.agrtDel(new EntPayAgrtDelRequest());
Assertions.assertEquals("000000", response.getRecode());
} catch (Exception e) {
log.info(e.getMessage());
}
}
@Test
void agrtQueryListTest() {
try {
EntPayAgrtQueryListResponse response = service.agrtQueryList(new EntPayAgrtQueryListRequest());
Assertions.assertEquals("000000", response.getRecode());
} catch (Exception e) {
log.info(e.getMessage());
}
}
@Test
void commonAgrtPayTest() {
try {
CommonAgrtPayResponse response = service.commonAgrtPay(new CommonAgrtPayRequest());
Assertions.assertEquals("000000", response.getRecode());
} catch (Exception e) {
log.info(e.getMessage());
}
}
@Test
void agrtPayTest() {
try {
EntPayAgrtPayResponse response = service.agrtPay(new EntPayAgrtPayRequest());
Assertions.assertEquals("000000", response.getRecode());
} catch (Exception e) {
log.info(e.getMessage());
}
}
}