Skip to content

Commit

Permalink
Testfix
Browse files Browse the repository at this point in the history
  • Loading branch information
victormunoz committed May 26, 2017
1 parent c9ea7d9 commit 4f13ba3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
3 changes: 2 additions & 1 deletion src/main/resources/tifftags/Photoshop.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
"description": "",
"source": "",
"created": "18/05/2015",
"modified": "18/05/2015"
"modified": "18/05/2015",
"forceDescription": ""
}
22 changes: 11 additions & 11 deletions src/test/java/com/easyinnova/tiff/TiffTagsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,22 +52,22 @@ public class TiffTagsTest {
@Test
public void test() {
Tag tag = TiffTags.getTag(259);
assertEquals(tag.getTagValueDescription("5"), "LZW");
assertEquals(tag.getTagValueDescription("unexisting"), null);
assertEquals(tag.getTextDescription("5"), "LZW");
assertEquals(tag.getTextDescription("unexisting"), null);

Tag tag2 = TiffTags.getTag(TiffTags.getTagId("PhotometricInterpretation"));
assertEquals(tag2.getTagValueDescription("2"), "RGB");
assertEquals(tag2.getTagValueDescription("6"), "YCbCr");
assertEquals(tag2.getTagValueDescription("unexisting"), null);
assertEquals(tag2.getTextDescription("2"), "RGB");
assertEquals(tag2.getTextDescription("6"), "YCbCr");
assertEquals(tag2.getTextDescription("unexisting"), null);

tag2 = TiffTags.getTag(TiffTags.getTagId("Orientation"));
assertEquals(tag2.getTagValueDescription("1"), "TopLeft");
assertEquals(tag2.getTagValueDescription("unexisting"), null);
assertEquals(tag2.getTextDescription("1"), "TopLeft");
assertEquals(tag2.getTextDescription("unexisting"), null);

tag2 = TiffTags.getTag(TiffTags.getTagId("PlanarConfiguration"));
assertEquals(tag2.getTagValueDescription("1"), "Chunky");
assertEquals(tag2.getTagValueDescription("2"), "Planar");
assertEquals(tag2.getTagValueDescription("unexisting"), null);
assertEquals(tag2.getTextDescription("1"), "Chunky");
assertEquals(tag2.getTextDescription("2"), "Planar");
assertEquals(tag2.getTextDescription("unexisting"), null);

TiffReader tr;
try {
Expand All @@ -79,7 +79,7 @@ public void test() {
assertEquals(true, tr.getBaselineValidation().isCorrect());

String value =
tr.getModel().getFirstIFD().getTag("PhotometricInterpretation").getDescriptiveValue();
tr.getModel().getFirstIFD().getTag("PhotometricInterpretation").getFirstTextReadValue();
assertEquals(value, "Bilevel");
} catch (ReadTagsIOException e) {
assertEquals(0, 1);
Expand Down

0 comments on commit 4f13ba3

Please sign in to comment.