You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@linkis.apache.org by ca...@apache.org on 2022/08/23 15:18:39 UTC

[incubator-linkis-website] branch dev updated: fix: ado change dao (#491)

This is an automated email from the ASF dual-hosted git repository.

casion pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-linkis-website.git


The following commit(s) were added to refs/heads/dev by this push:
     new 3c3a530101 fix: ado change dao (#491)
3c3a530101 is described below

commit 3c3a530101116784530df965111f2a6869be3af2
Author: ruY <43...@users.noreply.github.com>
AuthorDate: Tue Aug 23 23:18:34 2022 +0800

    fix: ado change dao (#491)
---
 community/how-to-write-unit-test-code.md                       |  6 +++---
 .../current/how-to-write-unit-test-code.md                     | 10 +++++-----
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/community/how-to-write-unit-test-code.md b/community/how-to-write-unit-test-code.md
index 2b134741d1..5c2f6791b5 100644
--- a/community/how-to-write-unit-test-code.md
+++ b/community/how-to-write-unit-test-code.md
@@ -11,7 +11,7 @@ Idea enhancement plugin
 
 - JUnitGenerator V2. 0 standard module for generating test cases
 - Create the allnewset object and set the default value for allnewset
-- The association mapping between mybatisx ADO and mapper is easy to view
+- The association mapping between mybatisx DAO and mapper is easy to view
 
 ### Configure the Template of JUnit in Idea
 
@@ -313,11 +313,11 @@ Main scenarios: scenarios with and without unnecessary parameters are abnormal
         logger.info(mvcResult.getResponse().getContentAsString());
     }
 
-``` 
+```
 
 ### Unit Test of Server class
    //todo
-   
+
 ### Unit Test of Dao class
 
 Use H2 database, application. In the configuration file In properties, you need to configure the basic information of H2 database and the relevant path information of mybatis  
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs-community/current/how-to-write-unit-test-code.md b/i18n/zh-CN/docusaurus-plugin-content-docs-community/current/how-to-write-unit-test-code.md
index f621c75d75..0bdc15ca36 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs-community/current/how-to-write-unit-test-code.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs-community/current/how-to-write-unit-test-code.md
@@ -7,7 +7,7 @@ Junit5+Mockito+jacoco+h2本地数据库
 Idea增强插件 
 - JUnitGenerator V2.​0  用于生成测试用例的标准模块
 - GenerateAllSet   用于快速new创建对象,并设置默认值
-- MybatisX  ado与mapper的关联映射 方便查看
+- MybatisX  dao与mapper的关联映射 方便查看
 
 ### 配置IDEA的Junit的模板 
 ```properties
@@ -112,7 +112,7 @@ public class $testClass {
 } 
 #end
 
-```   
+```
 ![test-0](https://user-images.githubusercontent.com/29391030/155080741-7e6b89db-0ee6-48e1-a858-4123d5bbf2f0.png) 
 
 1.配置配置测试类生成路径  
@@ -152,13 +152,13 @@ public class $testClass {
 - 3.单元测试必须可以重复执行的,不能受到外界环境的影响。 
     说明:单元测试通常会被放到持续集成中,每次有代码 check in 时单元测试都会被执行。如果单测对外部环境(网络、服务、中间件等)有依赖,容易导致持续集成机制的不可用。   
     正例:为了不受外界环境影响,要求设计代码时就把被测类的相关依赖改成注入,在测试时用 spring 这样的依赖注入框架注入一个本地(内存)实现或者 Mock 实现。
- 
+
 - 4.增量代码确保单元测试通过。   
     说明:新增代码必须补充单元测试,如果新增代码影响了原有单元测试,请修正
 
 - 5.对于单元测试,要保证测试粒度足够小,有助于精确定位问题。单测粒度一般都是方法级别(工具类或则枚举类等极少场景可以是类级别)。   
     说明:只有测试粒度小才能在出错时尽快定位到出错位置。单测不负责检查跨类或者跨系统的交互逻辑,那是集成测试的领域。
- 
+
 
  ## 断言的使用
 所有的测试用例的结果验证都必须使用断言模式
@@ -280,7 +280,7 @@ Assertions.assertThrows方法,用来测试Executable实例执行execute方法
         logger.info(mvcResult.getResponse().getContentAsString());
     }
 
-``` 
+```
 ### Server 类的单元测试
     //todo
 ### Dao 类的单元测试


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@linkis.apache.org
For additional commands, e-mail: commits-help@linkis.apache.org