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/util CopyTest.java
Date Sat, 16 Apr 2005 13:59:30 GMT
tfischer    2005/04/16 06:59:30

  Modified:    src/rttest/org/apache/torque/util CopyTest.java
  Log:
  changed indentation to 4 spaces each level
  fixed a bug which printed a wrong error message if the test failed
  
  Revision  Changes    Path
  1.6       +24 -21    db-torque/src/rttest/org/apache/torque/util/CopyTest.java
  
  Index: CopyTest.java
  ===================================================================
  RCS file: /home/cvs/db-torque/src/rttest/org/apache/torque/util/CopyTest.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- CopyTest.java	19 Mar 2005 06:25:27 -0000	1.5
  +++ CopyTest.java	16 Apr 2005 13:59:30 -0000	1.6
  @@ -47,28 +47,31 @@
        */
       public void testCopyObject() throws Exception
       {
  -                Author author = new Author();
  -                author.setName("Author to be copied");
  -                author.save();
  +        Author author = new Author();
  +        author.setName("Author to be copied");
  +        author.save();
   
  -                for (int j = 1; j <= 10; j++)
  -                {
  -                        Book book = new Book();
  -                        book.setAuthor(author);
  -                        book.setTitle("Book " + j + " - " + author.getName());
  -                        book.setIsbn("unknown");
  -                        book.save();
  -                }
  -                assertTrue("Number of books before copy should be 10, was "
  -                + author.getBooks().size(), author.getBooks().size() == 10);
  -                Author authorCopy = author.copy();
  -                authorCopy.save();
  +        for (int j = 1; j <= 10; j++)
  +        {
  +            Book book = new Book();
  +            book.setAuthor(author);
  +            book.setTitle("Book " + j + " - " + author.getName());
  +            book.setIsbn("unknown");
  +            book.save();
  +        }
  +        assertTrue("Number of books before copy should be 10, was "
  +                + author.getBooks().size(), 
  +                author.getBooks().size() == 10);
  +        Author authorCopy = author.copy();
  +        authorCopy.save();
   
  -                author = AuthorPeer.retrieveByPK(author.getPrimaryKey());
  -                assertTrue("Number of books in original object should be 10, was "
  -                + author.getBooks().size(), author.getBooks().size() == 10);
  +        author = AuthorPeer.retrieveByPK(author.getPrimaryKey());
  +        assertTrue("Number of books in original object should be 10, was "
  +                + author.getBooks().size(), 
  +                author.getBooks().size() == 10);
   
  -                assertTrue("Number of books after copy should be 10, was "
  -                + author.getBooks().size(), authorCopy.getBooks().size() == 10);
  +        assertTrue("Number of books after copy should be 10, was "
  +                + authorCopy.getBooks().size(), 
  +                authorCopy.getBooks().size() == 10);
       }
   }
  
  
  

---------------------------------------------------------------------
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