~ubuntu-branches/ubuntu/quantal/commons-io/quantal

« back to all changes in this revision

Viewing changes to src/test/org/apache/commons/io/output/ByteArrayOutputStreamTestCase.java

  • Committer: Bazaar Package Importer
  • Author(s): Varun Hiremath
  • Date: 2008-02-21 13:26:43 UTC
  • mfrom: (1.1.3 upstream) (3.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080221132643-p4c8f8lhb9rnqnlo
Tags: 1.4-1
* New upstream release
* Bump Standards-Version to 3.7.3
* Bump up debhelper compat to 6
* Replace XS-Vcs headers with Vcs
* debian/patches:
  - remove 01_no_ext_links.dpatch - not required
  - remove 02_no_mkdir_in_homedir.dpatch - not required
* Remove dpatch from Build-Depends
* Update debian/rules and debian/libcommons-io-java-doc.install
  with new target dirs
* debian/copyright: add copyright notice

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 */
17
17
package org.apache.commons.io.output;
18
18
 
 
19
import java.io.ByteArrayInputStream;
19
20
import java.io.IOException;
20
21
 
21
22
import junit.framework.TestCase;
120
121
        written = writeData(baout, ref, new int[] {5, 47, 33, 60, 1, 0, 8});
121
122
        assertEquals(155, written);
122
123
        checkStreams(baout, ref);
123
 
        
 
124
 
 
125
        //Test the readFrom(InputStream) method
 
126
        baout.reset();
 
127
        written = baout.write(new ByteArrayInputStream(ref.toByteArray()));
 
128
        assertEquals(155, written);
 
129
        checkStreams(baout, ref);
 
130
 
124
131
        //Write the commons Byte[]OutputStream to a java.io.Byte[]OutputStream 
125
132
        //and vice-versa to test the writeTo() method.
126
133
        ByteArrayOutputStream baout1 = new ByteArrayOutputStream(32);