~ubuntu-branches/debian/stretch/libcommons-compress-java/stretch

« back to all changes in this revision

Viewing changes to src/test/java/org/apache/commons/compress/compressors/BZip2TestCase.java

  • Committer: Package Import Robot
  • Author(s): Emmanuel Bourg
  • Date: 2015-08-31 23:22:38 UTC
  • mfrom: (1.1.9)
  • Revision ID: package-import@ubuntu.com-20150831232238-gz3ynyvs68tok1a3
Tags: 1.10-1
* New upstream release
* Updated the OSGi metadata

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 */
19
19
package org.apache.commons.compress.compressors;
20
20
 
 
21
import static org.junit.Assert.*;
 
22
 
21
23
import java.io.File;
22
24
import java.io.FileInputStream;
23
25
import java.io.FileOutputStream;
27
29
import org.apache.commons.compress.AbstractTestCase;
28
30
import org.apache.commons.compress.compressors.bzip2.BZip2CompressorInputStream;
29
31
import org.apache.commons.compress.utils.IOUtils;
 
32
import org.junit.Test;
30
33
 
31
34
public final class BZip2TestCase extends AbstractTestCase {
32
35
 
 
36
    @Test
33
37
    public void testBzipCreation()  throws Exception {
34
38
        File output = null;
35
39
        final File input = getFile("test.txt");
58
62
        assertEquals(input.length(),decompressed.length());
59
63
    }
60
64
 
 
65
    @Test
61
66
    public void testBzip2Unarchive() throws Exception {
62
67
        final File input = getFile("bla.txt.bz2");
63
68
        final File output = new File(dir, "bla.txt");
69
74
        os.close();
70
75
    }
71
76
 
 
77
    @Test
72
78
    public void testConcatenatedStreamsReadFirstOnly() throws Exception {
73
79
        final File input = getFile("multiple.bz2");
74
80
        final InputStream is = new FileInputStream(input);
86
92
        }
87
93
    }
88
94
 
 
95
    @Test
89
96
    public void testConcatenatedStreamsReadFully() throws Exception {
90
97
        final File input = getFile("multiple.bz2");
91
98
        final InputStream is = new FileInputStream(input);
105
112
        }
106
113
    }
107
114
 
 
115
    @Test
108
116
    public void testCOMPRESS131() throws Exception {
109
117
        final File input = getFile("COMPRESS-131.bz2");
110
118
        final InputStream is = new FileInputStream(input);