From d34f251c85e4e87b4b8e25bcd2df420c19effdf0 Mon Sep 17 00:00:00 2001 From: "Yangkai.Shen" <237497819@qq.com> Date: Thu, 8 Nov 2018 14:27:27 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20spring-boot-demo-orm-mybatis=20?= =?UTF-8?q?=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xkcoding/orm/mybatis/mapper/UserMapperTest.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/spring-boot-demo-orm-mybatis/src/test/java/com/xkcoding/orm/mybatis/mapper/UserMapperTest.java b/spring-boot-demo-orm-mybatis/src/test/java/com/xkcoding/orm/mybatis/mapper/UserMapperTest.java index dcb10c7..4d29f02 100644 --- a/spring-boot-demo-orm-mybatis/src/test/java/com/xkcoding/orm/mybatis/mapper/UserMapperTest.java +++ b/spring-boot-demo-orm-mybatis/src/test/java/com/xkcoding/orm/mybatis/mapper/UserMapperTest.java @@ -31,6 +31,9 @@ public class UserMapperTest extends SpringBootDemoOrmMybatisApplicationTests { @Autowired private UserMapper userMapper; + /** + * 测试查询所有 + */ @Test public void selectAllUser() { List userList = userMapper.selectAllUser(); @@ -38,6 +41,9 @@ public class UserMapperTest extends SpringBootDemoOrmMybatisApplicationTests { log.debug("【userList】= {}", userList); } + /** + * 测试根据主键查询单个 + */ @Test public void selectUserById() { User user = userMapper.selectUserById(1L); @@ -45,6 +51,9 @@ public class UserMapperTest extends SpringBootDemoOrmMybatisApplicationTests { log.debug("【user】= {}", user); } + /** + * 测试保存 + */ @Test public void saveUser() { String salt = IdUtil.fastSimpleUUID(); @@ -53,6 +62,9 @@ public class UserMapperTest extends SpringBootDemoOrmMybatisApplicationTests { Assert.assertEquals(1, i); } + /** + * 测试根据主键删除 + */ @Test public void deleteById() { int i = userMapper.deleteById(1L);