commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bay...@apache.org
Subject cvs commit: jakarta-commons-sandbox/io/src/test/org/apache/commons/io IOUtilsTestCase.java
Date Fri, 02 Jan 2004 06:18:40 GMT
bayard      2004/01/01 22:18:40

  Modified:    io/src/test/org/apache/commons/io IOUtilsTestCase.java
  Log:
  removed test cases that only test CopyUtils methods, as these methods now have their own
tests in the CopyUtilsTest class
  
  Revision  Changes    Path
  1.7       +3 -101    jakarta-commons-sandbox/io/src/test/org/apache/commons/io/IOUtilsTestCase.java
  
  Index: IOUtilsTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/io/src/test/org/apache/commons/io/IOUtilsTestCase.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- IOUtilsTestCase.java	30 Dec 2003 15:26:59 -0000	1.6
  +++ IOUtilsTestCase.java	2 Jan 2004 06:18:40 -0000	1.7
  @@ -139,54 +139,6 @@
           assertTrue( "Content not equal according to java.util.Arrays#equals()", Arrays.equals(
b0, b1 ) );
       }
   
  -    public void testInputStreamToOutputStream()
  -        throws Exception
  -    {
  -        File destination = newFile( "copy1.txt" );
  -        FileInputStream fin = new FileInputStream( m_testFile );
  -        try {
  -            FileOutputStream fout = new FileOutputStream( destination );
  -            try {
  -                int count = CopyUtils.copy( fin, fout );
  -                assertTrue( "Not all bytes were read", fin.available() == 0 );
  -                assertEquals( "Number of bytes read should equal file size", m_testFile.length(),
count );
  -                fout.flush();
  -
  -                checkFile( destination, m_testFile );
  -                checkWrite( fout );
  -            } finally {
  -                fout.close();
  -            }
  -            deleteFile( destination );
  -        } finally {
  -            fin.close();
  -        }
  -    }
  -
  -    public void testInputStreamToWriter()
  -        throws Exception
  -    {
  -        File destination = newFile( "copy2.txt" );
  -        FileInputStream fin = new FileInputStream( m_testFile );
  -        try {
  -            FileWriter fout = new FileWriter( destination );
  -            try {
  -                CopyUtils.copy( fin, fout );
  -
  -                assertTrue( "Not all bytes were read", fin.available() == 0 );
  -                fout.flush();
  -
  -                checkFile( destination, m_testFile );
  -                checkWrite( fout );
  -            } finally {
  -                fout.close();
  -            }
  -            deleteFile( destination );
  -        } finally {
  -             fin.close();
  -        }
  -    }
  -
       public void testInputStreamToString()
           throws Exception
       {
  @@ -197,56 +149,6 @@
               assertTrue( "Not all bytes were read", fin.available() == 0 );
               assertTrue( "Wrong output size: out.length()=" + out.length() +
                           "!=" + FILE_SIZE, out.length() == FILE_SIZE );
  -        } finally {
  -            fin.close();
  -        }
  -    }
  -
  -    public void testReaderToOutputStream()
  -        throws Exception
  -    {
  -        File destination = newFile( "copy3.txt" );
  -        FileReader fin = new FileReader( m_testFile );
  -        try {
  -            FileOutputStream fout = new FileOutputStream( destination );
  -            try {
  -                CopyUtils.copy( fin, fout );
  -                //Note: this method *does* flush. It is equivalent to:
  -                //  OutputStreamWriter _out = new OutputStreamWriter(fout);
  -                //  CopyUtils.copy( fin, _out, 4096 ); // copy( Reader, Writer, int );
  -                //  _out.flush();
  -                //  out = fout;
  -    
  -                // Note: rely on the method to flush
  -                checkFile( destination, m_testFile );
  -                checkWrite( fout );
  -            } finally {
  -                fout.close();
  -            }
  -            deleteFile( destination );
  -        } finally {
  -            fin.close();
  -        }
  -    }
  -
  -    public void testReaderToWriter()
  -        throws Exception
  -    {
  -        File destination = newFile( "copy4.txt" );
  -        FileReader fin = new FileReader( m_testFile );
  -        try {
  -            FileWriter fout = new FileWriter( destination );
  -            try {
  -                int count = CopyUtils.copy( fin, fout );
  -                assertEquals( "The number of characters returned by copy is wrong", m_testFile.length(),
count);
  -
  -                fout.flush();
  -                checkFile( destination, m_testFile );
  -                checkWrite( fout );
  -            } finally {
  -                fout.close();
  -            }
  -            deleteFile( destination );
           } finally {
               fin.close();
           }
  
  
  

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


Mime
View raw message