pojos.init();
((NutDao) dao).setSqlManager(new FileSqlManager("org/nutz/dao/test/sqls/exec.sqls"));
int platoonId = 23;
try {
pojos.initPlatoon(platoonId);
Sql sql = dao.sqls().create("tank.insert");
sql.vars().set("id", platoonId);
sql.params().set("code", "T1").set("weight", 12);
dao.execute(sql);
sql = dao.sqls().create("tank.insert");
sql.vars().set("id", platoonId);
sql.params().set("code", "T2").set("weight", 13);
dao.execute(sql);
sql = dao.sqls().create("tank.insert");
sql.vars().set("id", platoonId);
sql.params().set("code", "T3").set("weight", 14);
dao.execute(sql);
sql = dao.sqls().create("tank.insert");
sql.vars().set("id", platoonId);
sql.params().set("code", "T4").set("weight", 15);
dao.execute(sql);
TableName.run(platoonId, new Atom() {
public void run() {
assertEquals(4, dao.count(Tank.class));