* @since 2004-12-26
* @version $Revision: 1.1 $
*/
public class SimpleParameterQueryTest extends TestCase {
public void testParsing(){
SimpleParameterQuery q1 = new SimpleParameterQuery("select * from user where age > #age#");
assertEquals("select * from user where age > ?", q1.getSql(null));
SimpleParameterQuery q2 = new SimpleParameterQuery("select * from user where age > #age# and name like #name#");
assertEquals("select * from user where age > ? and name like ?", q2.getSql(null));
assertEquals("age", q2.getParameterNames().get(0));
assertEquals("name", q2.getParameterNames().get(1));
}