Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

updated image file name in TIFWriterTest

  • Loading branch information...
commit 3a12e23f518f551f404e6a38322c9edd6be139bb 1 parent d28dfe2
@ksclarke authored
Showing with 36 additions and 36 deletions.
  1. +36 −36 src/test/java/gov/lanl/adore/djatoka/io/writer/TIFWriterTest.java
View
72 src/test/java/gov/lanl/adore/djatoka/io/writer/TIFWriterTest.java
@@ -6,54 +6,54 @@
import gov.lanl.adore.djatoka.io.reader.DjatokaReader;
import java.awt.image.BufferedImage;
+
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
-import java.util.Iterator;
-
-import javax.imageio.ImageIO;
import org.junit.Test;
+
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class TIFWriterTest {
- private static final Logger LOGGER = LoggerFactory
- .getLogger(TIFWriterTest.class);
-
- @Test
- public void testWrite() {
- File outFile = null;
-
- try {
- outFile = File.createTempFile("test1-", ".tif");
-
- String input = "src/test/resources/images/sample.tif";
- BufferedImage bufImage = new DjatokaReader().open(input);
- OutputStream outStream = new FileOutputStream(outFile);
- TIFWriter tifWriter = new TIFWriter();
-
- tifWriter.write(bufImage, outStream);
- outStream.close();
- }
- catch (IOException details) {
- fail(details.getMessage());
- }
- catch (FormatIOException details) {
- fail(details.getMessage());
- }
- finally {
- if (outFile != null) {
- outFile.delete();
- }
- }
- }
+ private static final Logger LOGGER = LoggerFactory
+ .getLogger(TIFWriterTest.class);
+
+ private static final String TIF = "src/test/resources/images/ms0332_gra_21518.tiff";
+
+ @Test
+ public void testWrite() {
+ File outFile = null;
- @Test
- public void testSetWriterProperties() {
- // fail("Not yet implemented");
+ try {
+ outFile = File.createTempFile("test1-", ".tif");
+
+ BufferedImage bufImage = new DjatokaReader().open(TIF);
+ OutputStream outStream = new FileOutputStream(outFile);
+ TIFWriter tifWriter = new TIFWriter();
+
+ tifWriter.write(bufImage, outStream);
+ outStream.close();
+ }
+ catch (IOException details) {
+ fail(details.getMessage());
}
+ catch (FormatIOException details) {
+ fail(details.getMessage());
+ }
+ finally {
+ if (outFile != null) {
+ outFile.delete();
+ }
+ }
+ }
+
+ @Test
+ public void testSetWriterProperties() {
+ // fail("Not yet implemented");
+ }
}
Please sign in to comment.
Something went wrong with that request. Please try again.