Permalink
Browse files

pdf.Stream.getFilters() returns a list of filters.

  • Loading branch information...
eseifert committed Aug 19, 2017
1 parent ff38218 commit eb71adb36411888c8144beeb64e11c72c08541d6
Showing with 12 additions and 0 deletions.
  1. +12 −0 src/test/java/de/erichseifert/vectorgraphics2d/pdf/StreamTest.java
@@ -23,9 +23,11 @@
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThat;
import java.io.IOException;
import java.util.Collections;
import java.util.List;
import java.util.zip.DataFormatException;
import java.util.zip.Inflater;
@@ -132,6 +134,16 @@ public void contentsAreCompressedWhenFlateFilterIsSet() throws DataFormatExcepti
assertThat(decompressedOutput, is(inputData));
}
@Test
public void getFiltersReturnsListOfFilters() {
Stream stream = new Stream(Stream.Filter.FLATE);
List<Stream.Filter> filters = stream.getFilters();
List<Stream.Filter> expected = Collections.singletonList(Stream.Filter.FLATE);
assertEquals(expected, filters);
}
@Test(expected = UnsupportedOperationException.class)
public void getFiltersResultIsUnmodifiable() {
Stream stream = new Stream();

0 comments on commit eb71adb

Please sign in to comment.