Skip to content

Commit cc439a3

Browse files
author
hewei
committed
测试用例修正
1 parent 3129c95 commit cc439a3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/test/java/com/itfsw/mybatis/generator/plugins/OptimisticLockerPluginTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,12 +310,11 @@ public void reloadProject(SqlSession sqlSession, ClassLoader loader, String pack
310310

311311
ObjectUtil tb = new ObjectUtil(loader, packagz + ".Tb");
312312
tb.set("id", 1L);
313-
tb.invoke("nextVersion", 152L); // nextVersion方法
314313
tb.set("incF2", 10L);
315314
tb.set("incF3", 5L);
316315

317316
// sql
318-
String sql = SqlHelper.getFormatMapperSql(tbMapper.getObject(), "updateWithVersionByExample", 100L, tb.getObject(), tbExample.getObject());
317+
String sql = SqlHelper.getFormatMapperSql(tbMapper.getObject(), "updateWithVersionByExample", 100L, tb.invoke("nextVersion", 152L), tbExample.getObject());
319318
Assert.assertEquals(sql, "update tb set inc_f1 = 152, id = 1, field1 = 'null', inc_f2 = 10, inc_f3 = 5 WHERE inc_f1 = 100 and ( ( id = '1' ) )");
320319

321320
// 执行一次,因为版本号100不存在所以应该返回0

0 commit comments

Comments
 (0)