mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix code
This commit is contained in:
@@ -107,7 +107,7 @@ public class CRUDTest {
|
||||
|
||||
@Test
|
||||
public void findTest() {
|
||||
final List<Entity> find = db.find(ListUtil.toList("name AS name2"), Entity.create("user"), new EntityListHandler());
|
||||
final List<Entity> find = db.find(ListUtil.of("name AS name2"), Entity.create("user"), new EntityListHandler());
|
||||
Assert.assertFalse(find.isEmpty());
|
||||
}
|
||||
|
||||
@@ -168,7 +168,7 @@ public class CRUDTest {
|
||||
Console.log(data1);
|
||||
Console.log(data2);
|
||||
|
||||
final int[] result = db.insert(ListUtil.toList(data1, data2));
|
||||
final int[] result = db.insert(ListUtil.of(data1, data2));
|
||||
Console.log(result);
|
||||
}
|
||||
|
||||
@@ -185,7 +185,7 @@ public class CRUDTest {
|
||||
|
||||
Console.log(data1);
|
||||
|
||||
final int[] result = db.insert(ListUtil.toList(data1));
|
||||
final int[] result = db.insert(ListUtil.of(data1));
|
||||
Console.log(result);
|
||||
}
|
||||
|
||||
|
@@ -31,7 +31,7 @@ public class ConcurentTest {
|
||||
for(int i = 0; i < 10000; i++) {
|
||||
ThreadUtil.execute(() -> {
|
||||
final List<Entity> find;
|
||||
find = db.find(ListUtil.toList("name AS name2"), Entity.create("user"), new EntityListHandler());
|
||||
find = db.find(ListUtil.of("name AS name2"), Entity.create("user"), new EntityListHandler());
|
||||
Console.log(find);
|
||||
});
|
||||
}
|
||||
|
@@ -15,7 +15,7 @@ public class PicTransferTest {
|
||||
@Ignore
|
||||
public void findTest() {
|
||||
Db.of().find(
|
||||
ListUtil.of("NAME", "TYPE", "GROUP", "PIC"),
|
||||
ListUtil.view("NAME", "TYPE", "GROUP", "PIC"),
|
||||
Entity.create("PIC_INFO").set("TYPE", 1),
|
||||
rs -> {
|
||||
while(rs.next()){
|
||||
|
@@ -27,7 +27,7 @@ public class MetaUtilTest {
|
||||
@Test
|
||||
public void getTableMetaTest() {
|
||||
final Table table = MetaUtil.getTableMeta(ds, "user");
|
||||
Assert.assertEquals(SetUtil.newHashSet("id"), table.getPkNames());
|
||||
Assert.assertEquals(SetUtil.of("id"), table.getPkNames());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@@ -23,6 +23,6 @@ public class ConditionGroupTest {
|
||||
final ConditionBuilder conditionBuilder = ConditionBuilder.of(cg2, condition4);
|
||||
|
||||
Assert.assertEquals("((a = ? OR b = ?) AND c = ?) AND d = ?", conditionBuilder.build());
|
||||
Assert.assertEquals(ListUtil.of("A", "B", "C", "D"), conditionBuilder.getParamValues());
|
||||
Assert.assertEquals(ListUtil.view("A", "B", "C", "D"), conditionBuilder.getParamValues());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user