Author: rdonkin
Date: Sun Dec  8 21:49:00 2013
New Revision: 1549336

URL: http://svn.apache.org/r1549336
Log:
Add test: testToStringComposite

Modified:
    
creadur/rat/branches/gsoc/apache-rat-core/src/test/java/org/apache/rat/document/impl/FileDocumentTest.java

Modified: 
creadur/rat/branches/gsoc/apache-rat-core/src/test/java/org/apache/rat/document/impl/FileDocumentTest.java
URL: 
http://svn.apache.org/viewvc/creadur/rat/branches/gsoc/apache-rat-core/src/test/java/org/apache/rat/document/impl/FileDocumentTest.java?rev=1549336&r1=1549335&r2=1549336&view=diff
==============================================================================
--- 
creadur/rat/branches/gsoc/apache-rat-core/src/test/java/org/apache/rat/document/impl/FileDocumentTest.java
 (original)
+++ 
creadur/rat/branches/gsoc/apache-rat-core/src/test/java/org/apache/rat/document/impl/FileDocumentTest.java
 Sun Dec  8 21:49:00 2013
@@ -43,8 +43,9 @@ public class FileDocumentTest {
                Assert.assertTrue(fileDocument.isComposite());
        }
 
+
        /**
-        * Test is composite.
+        * Test non is composite.
         * 
         * @throws FileNotFoundException
         *             the file not found exception
@@ -55,4 +56,20 @@ public class FileDocumentTest {
                FileDocument fileDocument = new FileDocument(new File(file));
                Assert.assertFalse(fileDocument.isComposite());
        }
+
+       /**
+        * Test to string composite.
+        * 
+        * @throws FileNotFoundException
+        */
+       @Test
+       public void testToStringComposite() throws FileNotFoundException {
+               File file = Resources.getResourceFile("elements/Source.java");
+               FileDocument fileDocument = new FileDocument(file);
+               Assert.assertEquals(
+                               "FileDocument ( " + "file = " + 
fileDocument.getName() + " "
+                               + "name = " + DocumentImplUtils.toName(file) + 
" "
+                               + "metaData = " + fileDocument.getMetaData() + 
" " + " )",
+                               fileDocument.toString());
+       }
 }


Reply via email to