db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject cvs commit: db-torque/src/rttest/org/apache/torque DataTest.java
Date Fri, 04 Mar 2005 06:38:54 GMT
tfischer    2005/03/03 22:38:54

  Modified:    src/rttest/org/apache/torque DataTest.java
  Log:
  added test for TRQS267
  
  Revision  Changes    Path
  1.12      +25 -1     db-torque/src/rttest/org/apache/torque/DataTest.java
  
  Index: DataTest.java
  ===================================================================
  RCS file: /home/cvs/db-torque/src/rttest/org/apache/torque/DataTest.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- DataTest.java	18 Feb 2005 09:26:03 -0000	1.11
  +++ DataTest.java	4 Mar 2005 06:38:54 -0000	1.12
  @@ -31,6 +31,7 @@
   import org.apache.torque.test.BookPeer;
   import org.apache.torque.test.BooleanCheck;
   import org.apache.torque.test.BooleanCheckPeer;
  +import org.apache.torque.test.A;
   import org.apache.torque.test.DateTest;
   import org.apache.torque.test.DateTestPeer;
   import org.apache.torque.test.MultiPk;
  @@ -961,6 +962,29 @@
           }
       }
           
  +    /**
  +     * Tests inserting single quotes in Strings.
  +     * This may not crash now, but in a later task like datasql, 
  +     * so the data has to be inserted in a table which does not get cleaned
  +     * during the runtime test.
  +     */
  +    public void testSingleQuotes() 
  +    {
  +        try 
  +        {
  +            A a = new A();
  +            a.setName("has Single ' Quote");
  +            a.save();
  +        }
  +        catch( Exception e) 
  +        {
  +            e.printStackTrace();
  +            fail("Exception caught : " 
  +                     + e.getClass().getName() 
  +                     + " : " + e.getMessage());
  +        }
  +    }
  +        
           
       /**
        * Strips the schema and table name from a fully qualified colum name
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message