Author: vsiveton
Date: Thu Oct  2 15:11:17 2008
New Revision: 701259

URL: http://svn.apache.org/viewvc?rev=701259&view=rev
Log:
o be sure that generated files exist

Modified:
    
maven/doxia/doxia-tools/trunk/doxia-converter/src/test/java/org/apache/maven/doxia/ConverterTest.java

Modified: 
maven/doxia/doxia-tools/trunk/doxia-converter/src/test/java/org/apache/maven/doxia/ConverterTest.java
URL: 
http://svn.apache.org/viewvc/maven/doxia/doxia-tools/trunk/doxia-converter/src/test/java/org/apache/maven/doxia/ConverterTest.java?rev=701259&r1=701258&r2=701259&view=diff
==============================================================================
--- 
maven/doxia/doxia-tools/trunk/doxia-converter/src/test/java/org/apache/maven/doxia/ConverterTest.java
 (original)
+++ 
maven/doxia/doxia-tools/trunk/doxia-converter/src/test/java/org/apache/maven/doxia/ConverterTest.java
 Thu Oct  2 15:11:17 2008
@@ -102,6 +102,7 @@
 
         converter.convert( input, output );
         assertTrue( new File( out, "Doxia.htm.apt" ).exists() );
+        assertTrue( new File( out, "Doxia.htm.apt" ).length() != 0 );
 
         FileUtils.deleteDirectory( new File( getBasedir() + "/target/unit/" ) 
);
     }
@@ -127,6 +128,7 @@
 
         converter.convert( input, output );
         assertTrue( new File( out ).exists() );
+        assertTrue( new File( out ).length() != 0 );
 
         FileUtils.deleteDirectory( new File( getBasedir() + "/target/unit/" ) 
);
     }
@@ -152,6 +154,7 @@
 
         converter.convert( input, output );
         assertTrue( new File( out ).exists() );
+        assertTrue( new File( out ).length() != 0 );
 
         in = getBasedir() + "/target/unit/file/apt/test.apt.xhtml";
         from = "xhtml";
@@ -163,6 +166,7 @@
 
         converter.convert( input, output );
         assertTrue( new File( out ).exists() );
+        assertTrue( new File( out ).length() != 0 );
     }
 
     /**
@@ -186,6 +190,7 @@
 
         converter.convert( input, output );
         assertTrue( new File( out ).exists() );
+        assertTrue( new File( out ).length() != 0 );
 
         in = getBasedir() + 
"/target/unit/file/confluence/test.confluence.xhtml";
         from = "xhtml";
@@ -228,6 +233,7 @@
 
         converter.convert( input, output );
         assertTrue( new File( out ).exists() );
+        assertTrue( new File( out ).length() != 0 );
 
         // TODO: docbook output is still crap, see DOXIA-184
         // in = getBasedir() + "/target/unit/file/docbook/test.docbook.xhtml";
@@ -263,6 +269,7 @@
 
         converter.convert( input, output );
         assertTrue( new File( out ).exists() );
+        assertTrue( new File( out ).length() != 0 );
 
         in = getBasedir() + "/target/unit/file/fml/test.fml.xhtml";
         from = "xhtml";
@@ -305,6 +312,7 @@
 
         converter.convert( input, output );
         assertTrue( new File( out ).exists() );
+        assertTrue( new File( out ).length() != 0 );
 
         in = getBasedir() + "/target/unit/file/twiki/test.twiki.xhtml";
         from = "xhtml";
@@ -347,6 +355,7 @@
 
         converter.convert( input, output );
         assertTrue( new File( out ).exists() );
+        assertTrue( new File( out ).length() != 0 );
 
         in = getBasedir() + "/target/unit/file/xdoc/test.xdoc.xhtml";
         from = "xhtml";
@@ -358,6 +367,7 @@
 
         converter.convert( input, output );
         assertTrue( new File( out ).exists() );
+        assertTrue( new File( out ).length() != 0 );
     }
 
     /**
@@ -381,6 +391,7 @@
 
         converter.convert( input, output );
         assertTrue( new File( out ).exists() );
+        assertTrue( new File( out ).length() != 0 );
 
         in = getBasedir() + "/target/unit/file/xhtml/test.xhtml.xhtml";
         from = "xhtml";
@@ -392,6 +403,7 @@
 
         converter.convert( input, output );
         assertTrue( new File( out ).exists() );
+        assertTrue( new File( out ).length() != 0 );
     }
 
     /**
@@ -426,13 +438,14 @@
             converter.convert( input, output );
 
             IOUtil.copy( writer.toString(), fw );
-
-            assertTrue( outFile.exists() );
         }
         finally
         {
             IOUtil.close( fw );
         }
+
+        assertTrue( outFile.exists() );
+        assertTrue( outFile.length() != 0 );
     }
 
     /**
@@ -470,6 +483,7 @@
             IOUtil.copy( writer.toString(), fw );
 
             assertTrue( outFile.exists() );
+            assertTrue( outFile.length() != 0 );
         }
         finally
         {
@@ -512,6 +526,7 @@
             IOUtil.copy( writer.toString(), fw );
 
             assertTrue( outFile.exists() );
+            assertTrue( outFile.length() != 0 );
         }
         finally
         {
@@ -543,6 +558,7 @@
             IOUtil.copy( writer.toString(), fw );
 
             assertTrue( outFile.exists() );
+            assertTrue( outFile.length() != 0 );
         }
         finally
         {


Reply via email to