use of com.ctrip.platform.dal.dao.sqlbuilder.FreeUpdateSqlBuilder in project dal by ctripcorp.
the class FreeUpdateSqlBuilderTest method testSetTemplate.
@Test
public void testSetTemplate() throws SQLException {
FreeUpdateSqlBuilder test = createTest();
test.setTemplate(template);
assertEquals(template, test.build());
}
use of com.ctrip.platform.dal.dao.sqlbuilder.FreeUpdateSqlBuilder in project dal by ctripcorp.
the class FreeUpdateSqlBuilderTest method testSet.
@Test
public void testSet() throws SQLException {
FreeUpdateSqlBuilder test = createTest();
test.set(template, tableName, noShardTableName);
assertEquals("SET [template]=?, [dal_client_test]=?, [noShard]=?", test.build());
test = createTest();
test.update(table(noShardTableName));
test.set(template, tableName, noShardTableName);
assertEquals("UPDATE " + wrappedNoShardTableName + " SET [template]=?, [dal_client_test]=?, [noShard]=?", test.build());
test = createTest();
}
Aggregations