Skip to content

Commit 7d59833

Browse files
committed
Add test/test resource to GifImageHelper
1 parent f475285 commit 7d59833

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

io/src/test/java/com/itextpdf/io/image/GifTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,17 @@ This file is part of the iText (R) project.
4949
import org.junit.experimental.categories.Category;
5050

5151
import java.io.File;
52+
import java.io.FileInputStream;
5253
import java.io.IOException;
5354
import java.nio.file.Files;
54-
55+
import com.itextpdf.io.util.StreamUtil;
5556
@Category(UnitTest.class)
5657
public class GifTest {
5758
public static final String sourceFolder = "./src/test/resources/com/itextpdf/io/image/";
5859

5960
@Test
6061
public void gifImageTest() throws IOException {
61-
byte[] fileContent = Files.readAllBytes( new File( sourceFolder + "WP_20140410_001.gif" ).toPath() );
62+
byte[] fileContent = StreamUtil.inputStreamToArray( new FileInputStream( sourceFolder+"WP_20140410_001.gif" ) );
6263
ImageData img = ImageDataFactory.create( fileContent, false );
6364
Assert.assertTrue( img.isRawImage() );
6465
Assert.assertEquals( ImageType.GIF, img.getOriginalType() );

0 commit comments

Comments
 (0)