Skip to content

Commit

Permalink
Made a bit cleaner the latest tests with some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
luan-cestari committed Feb 5, 2015
1 parent 697088f commit a8a2535
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,24 +108,21 @@ public void testSQLGeneration() throws Exception {
connection.myPreparedStatement = new MyPreparedStatement();
nps = new SQLConverter(connection,"select * from table where column like 'abc:%def%' escape ':'");
assertEquals("select * from table where column like 'abc:%def%' escape ':'", nps.processedQuery);
assertFalse(nps.processedQuery.contains(":parameter"));
assertFalse(nps.processedQuery.contains("?"));
assertFalse(nps.processedQuery.contains("?")); //it should not find a field
}
{
connection = new MyConnection();
connection.myPreparedStatement = new MyPreparedStatement();
nps = new SQLConverter(connection,"select * from table where column like ' 123 \"123\"123 '");
assertEquals("select * from table where column like ' 123 \"123\"123 '", nps.processedQuery);
assertFalse(nps.processedQuery.contains(":parameter"));
assertFalse(nps.processedQuery.contains("?"));
assertFalse(nps.processedQuery.contains("?")); //it should not find a field
}
{
connection = new MyConnection();
connection.myPreparedStatement = new MyPreparedStatement();
nps = new SQLConverter(connection,"select * from table where column like ' 123 \\\"123\\\"1 :xyz 23 '");
assertEquals("select * from table where column like ' 123 \\\"123\\\"1 :xyz 23 '", nps.processedQuery);
assertFalse(nps.processedQuery.contains(":parameter"));
assertFalse(nps.processedQuery.contains("?"));
assertFalse(nps.processedQuery.contains("?")); //it should not find a field
}


Expand Down

0 comments on commit a8a2535

Please sign in to comment.