refactor(接口测试): 接口管理模块接口 MOCK 模块单元测试简化
This commit is contained in:
parent
9b00348b9a
commit
d725b5591f
|
@ -16,7 +16,6 @@ import io.metersphere.api.dto.request.http.MsHTTPElement;
|
|||
import io.metersphere.api.mapper.ApiDefinitionMapper;
|
||||
import io.metersphere.api.mapper.ApiDefinitionMockConfigMapper;
|
||||
import io.metersphere.api.mapper.ApiDefinitionMockMapper;
|
||||
import io.metersphere.api.mapper.ExtApiDefinitionMapper;
|
||||
import io.metersphere.api.service.ApiFileResourceService;
|
||||
import io.metersphere.api.utils.ApiDataUtils;
|
||||
import io.metersphere.plugin.api.spi.AbstractMsTestElement;
|
||||
|
@ -236,15 +235,6 @@ public class ApiDefinitionMockControllerTests extends BaseTest {
|
|||
requestPostPermissionTest(PermissionConstants.PROJECT_API_DEFINITION_MOCK_ADD, ADD, request);
|
||||
}
|
||||
|
||||
private ApiDefinitionMockAddRequest createApiDefinitionMockAddRequest() {
|
||||
ApiDefinitionMockAddRequest request = new ApiDefinitionMockAddRequest();
|
||||
request.setName("接口定义test");
|
||||
request.setProjectId(DEFAULT_PROJECT_ID);
|
||||
request.setTags(new LinkedHashSet<>(List.of("tag1", "tag2")));
|
||||
request.setApiDefinitionId(DEFAULT_API_ID);
|
||||
return request;
|
||||
}
|
||||
|
||||
private ApiDefinitionMock assertAddApiDefinitionMock(Object request, MsHTTPElement msHttpElement, String id) {
|
||||
ApiDefinitionMock apiDefinitionMock = apiDefinitionMockMapper.selectByPrimaryKey(id);
|
||||
ApiDefinitionMockConfig apiDefinitionMockConfig = apiDefinitionMockConfigMapper.selectByPrimaryKey(id);
|
||||
|
|
Loading…
Reference in New Issue