refactor(系统管理): 插件管理单元测试代码优化

This commit is contained in:
AgAngle 2023-11-21 14:13:00 +08:00 committed by jianxing
parent 3c26e9e432
commit f7b72284a0
1 changed files with 1 additions and 1 deletions

View File

@ -316,7 +316,7 @@ public class PluginControllerTests extends BaseTest {
MvcResult mvcResult = this.requestGetWithOkAndReturn(DEFAULT_LIST); MvcResult mvcResult = this.requestGetWithOkAndReturn(DEFAULT_LIST);
// 校验数据是否正确 // 校验数据是否正确
List<PluginDTO> pluginList = getResultDataArray(mvcResult, PluginDTO.class); List<PluginDTO> pluginList = getResultDataArray(mvcResult, PluginDTO.class);
Assertions.assertEquals(3, pluginList.size()); Assertions.assertEquals(pluginMapper.selectByExample(new PluginExample()).size(), pluginList.size());
// 获取数据库数据 // 获取数据库数据
List<String> pluginIds = pluginList.stream().map(PluginDTO::getId).toList(); List<String> pluginIds = pluginList.stream().map(PluginDTO::getId).toList();