fix(接口测试): 修改单词拼写错误

This commit is contained in:
AgAngle 2024-04-15 16:41:04 +08:00 committed by Craftsman
parent 81f1db9f42
commit 33351bfee8
5 changed files with 7 additions and 7 deletions

View File

@ -43,7 +43,7 @@ public class ApiParamConfig extends ParameterConfig {
* value 为对应的接口协议 * value 为对应的接口协议
* 环境前后置忽略协议需要使用 * 环境前后置忽略协议需要使用
*/ */
private Map<Class<? extends AbstractMsTestElement>, String> testElementClassProtocalMap = HashMap.newHashMap(0); private Map<Class<? extends AbstractMsTestElement>, String> testElementClassProtocolMap = HashMap.newHashMap(0);
@Override @Override

View File

@ -116,7 +116,7 @@ public class MsCommonElementConverter extends AbstractJmeterElementConverter<MsC
protocol = ApiConstants.HTTP_PROTOCOL; protocol = ApiConstants.HTTP_PROTOCOL;
} else { } else {
if (config instanceof ApiParamConfig apiParamConfig) { if (config instanceof ApiParamConfig apiParamConfig) {
protocol = apiParamConfig.getTestElementClassProtocalMap().get(parent.getClass()); protocol = apiParamConfig.getTestElementClassProtocolMap().get(parent.getClass());
} }
} }

View File

@ -521,7 +521,7 @@ public class ApiExecuteService {
public ApiParamConfig getApiParamConfig(String reportId) { public ApiParamConfig getApiParamConfig(String reportId) {
ApiParamConfig paramConfig = new ApiParamConfig(); ApiParamConfig paramConfig = new ApiParamConfig();
paramConfig.setTestElementClassPluginIdMap(apiPluginService.getTestElementPluginMap()); paramConfig.setTestElementClassPluginIdMap(apiPluginService.getTestElementPluginMap());
paramConfig.setTestElementClassProtocalMap(apiPluginService.getTestElementProtocolMap()); paramConfig.setTestElementClassProtocolMap(apiPluginService.getTestElementProtocolMap());
paramConfig.setReportId(reportId); paramConfig.setReportId(reportId);
return paramConfig; return paramConfig;
} }

View File

@ -1540,7 +1540,7 @@ public class ApiScenarioService extends MoveNodeService {
public ApiScenarioParamConfig getApiScenarioParamConfig(ApiScenarioParseParam request, ApiScenarioParseEnvInfo scenarioParseEnvInfo) { public ApiScenarioParamConfig getApiScenarioParamConfig(ApiScenarioParseParam request, ApiScenarioParseEnvInfo scenarioParseEnvInfo) {
ApiScenarioParamConfig parseConfig = new ApiScenarioParamConfig(); ApiScenarioParamConfig parseConfig = new ApiScenarioParamConfig();
parseConfig.setTestElementClassPluginIdMap(apiPluginService.getTestElementPluginMap()); parseConfig.setTestElementClassPluginIdMap(apiPluginService.getTestElementPluginMap());
parseConfig.setTestElementClassProtocalMap(apiPluginService.getTestElementProtocolMap()); parseConfig.setTestElementClassProtocolMap(apiPluginService.getTestElementProtocolMap());
parseConfig.setGrouped(request.getGrouped()); parseConfig.setGrouped(request.getGrouped());
parseConfig.setRootScenarioConfig(request.getScenarioConfig()); parseConfig.setRootScenarioConfig(request.getScenarioConfig());
if (BooleanUtils.isTrue(request.getGrouped())) { if (BooleanUtils.isTrue(request.getGrouped())) {

View File

@ -1207,7 +1207,7 @@ public class ApiScenarioControllerTests extends BaseTest {
Assertions.assertEquals(apiScenarioDetail.getUpdateUserName(), userMapper.selectByPrimaryKey(apiScenarioDetail.getUpdateUser()).getName()); Assertions.assertEquals(apiScenarioDetail.getUpdateUserName(), userMapper.selectByPrimaryKey(apiScenarioDetail.getUpdateUser()).getName());
Assertions.assertFalse(apiScenarioDetail.getFollow()); Assertions.assertFalse(apiScenarioDetail.getFollow());
// 验证数据 // 验证数据
asserGetApiScenarioSteps(this.addApiScenarioSteps, apiScenarioDetail.getSteps()); assertGetApiScenarioSteps(this.addApiScenarioSteps, apiScenarioDetail.getSteps());
apiScenarioService.follow(anOtherAddApiScenario.getId(), "admin"); apiScenarioService.follow(anOtherAddApiScenario.getId(), "admin");
mvcResult = this.requestGetWithOkAndReturn(DEFAULT_GET, anOtherAddApiScenario.getId()); mvcResult = this.requestGetWithOkAndReturn(DEFAULT_GET, anOtherAddApiScenario.getId());
@ -1274,7 +1274,7 @@ public class ApiScenarioControllerTests extends BaseTest {
} }
} }
private void asserGetApiScenarioSteps(List<? extends ApiScenarioStepCommonDTO> addApiScenarioSteps, List<? extends ApiScenarioStepCommonDTO> steps) { private void assertGetApiScenarioSteps(List<? extends ApiScenarioStepCommonDTO> addApiScenarioSteps, List<? extends ApiScenarioStepCommonDTO> steps) {
if (addApiScenarioSteps == null || steps == null) { if (addApiScenarioSteps == null || steps == null) {
Assertions.assertEquals(addApiScenarioSteps, null); Assertions.assertEquals(addApiScenarioSteps, null);
Assertions.assertEquals(steps, null); Assertions.assertEquals(steps, null);
@ -1285,7 +1285,7 @@ public class ApiScenarioControllerTests extends BaseTest {
ApiScenarioStepRequest stepRequest = (ApiScenarioStepRequest) addApiScenarioSteps.get(i); ApiScenarioStepRequest stepRequest = (ApiScenarioStepRequest) addApiScenarioSteps.get(i);
ApiScenarioStepDTO stepDTO = (ApiScenarioStepDTO) steps.get(i); ApiScenarioStepDTO stepDTO = (ApiScenarioStepDTO) steps.get(i);
Assertions.assertEquals(BeanUtils.copyBean(new ApiScenarioStepCommonDTO(), stepRequest), BeanUtils.copyBean(new ApiScenarioStepCommonDTO(), stepDTO)); Assertions.assertEquals(BeanUtils.copyBean(new ApiScenarioStepCommonDTO(), stepRequest), BeanUtils.copyBean(new ApiScenarioStepCommonDTO(), stepDTO));
asserGetApiScenarioSteps(stepRequest.getChildren(), stepDTO.getChildren()); assertGetApiScenarioSteps(stepRequest.getChildren(), stepDTO.getChildren());
} }
} }