You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ce...@apache.org on 2017/09/23 07:44:10 UTC
svn commit: r1809372 -
/poi/trunk/src/ooxml/testcases/org/apache/poi/TestPOIXMLProperties.java
Author: centic
Date: Sat Sep 23 07:44:09 2017
New Revision: 1809372
URL: http://svn.apache.org/viewvc?rev=1809372&view=rev
Log:
Tried to enable this test, but it is broken since a long time and I am not sure how this is expected to behave...
Modified:
poi/trunk/src/ooxml/testcases/org/apache/poi/TestPOIXMLProperties.java
Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/TestPOIXMLProperties.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/TestPOIXMLProperties.java?rev=1809372&r1=1809371&r2=1809372&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/TestPOIXMLProperties.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/TestPOIXMLProperties.java Sat Sep 23 07:44:09 2017
@@ -229,6 +229,7 @@ public final class TestPOIXMLProperties
return utcString.equals(dateTimeUtcString);
}
+ //@Test
public void testThumbnails() throws Exception {
POIXMLProperties noThumbProps = sampleNoThumb.getProperties();
@@ -241,19 +242,23 @@ public final class TestPOIXMLProperties
assertNotNull(_props.getThumbnailImage());
assertNull(noThumbProps.getThumbnailImage());
- assertEquals("thumbnail.jpeg", _props.getThumbnailFilename());
+ assertEquals("/thumbnail.jpeg", _props.getThumbnailFilename());
// Adding / changing
- noThumbProps.setThumbnail("Testing.png", new ByteArrayInputStream(new byte[1]));
+ ByteArrayInputStream imageData = new ByteArrayInputStream(new byte[1]);
+ assertEquals(1, imageData.available());
+ noThumbProps.setThumbnail("Testing.png", imageData);
assertNotNull(noThumbProps.getThumbnailPart());
- assertEquals("Testing.png", noThumbProps.getThumbnailFilename());
+ assertEquals("/Testing.png", noThumbProps.getThumbnailFilename());
assertNotNull(noThumbProps.getThumbnailImage());
assertEquals(1, noThumbProps.getThumbnailImage().available());
- noThumbProps.setThumbnail("Testing2.png", new ByteArrayInputStream(new byte[2]));
+ imageData = new ByteArrayInputStream(new byte[2]);
+ assertEquals(2, imageData.available());
+ noThumbProps.setThumbnail("Testing2.png", imageData);
assertNotNull(noThumbProps.getThumbnailPart());
- assertEquals("Testing.png", noThumbProps.getThumbnailFilename());
+ assertEquals("/Testing.png", noThumbProps.getThumbnailFilename());
assertNotNull(noThumbProps.getThumbnailImage());
assertEquals(2, noThumbProps.getThumbnailImage().available());
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org