From 37282aae8f25970b157c40ae0888684f974ba666 Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Thu, 26 Dec 2019 12:55:49 +0000 Subject: [PATCH] try to find issue in test git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1872001 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/poi/xwpf/usermodel/TestXWPFParagraph.java | 2 +- .../org/apache/poi/hssf/usermodel/TestHSSFPictureData.java | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFParagraph.java b/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFParagraph.java index f0ee0d76bb..eae2754527 100644 --- a/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFParagraph.java +++ b/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFParagraph.java @@ -308,7 +308,7 @@ public final class TestXWPFParagraph { assertEquals("1", p.getNumIlvl().toString()); } } - + @Test public void testAddingRuns() throws IOException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("sample.docx")) { diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFPictureData.java b/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFPictureData.java index afe1cb501b..1a330f0b38 100644 --- a/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFPictureData.java +++ b/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFPictureData.java @@ -28,7 +28,6 @@ import javax.imageio.ImageIO; import junit.framework.TestCase; import org.apache.poi.hssf.HSSFTestDataSamples; -import org.junit.Assume; import org.junit.BeforeClass; /** @@ -85,8 +84,7 @@ public final class TestHSSFPictureData extends TestCase{ } } } catch (IIOException e) { - Assume.assumeFalse(e.getMessage().contains("Can't create cache file")); - throw e; + assertFalse(e.getMessage(), e.getMessage().contains("Can't create cache file")); } } @@ -110,8 +108,7 @@ public final class TestHSSFPictureData extends TestCase{ assertEquals(HSSFWorkbook.PICTURE_TYPE_PNG, pict.getFormat()); assertEquals("image/png", pict.getMimeType()); } catch (IIOException e) { - Assume.assumeFalse(e.getMessage().contains("Can't create cache file")); - throw e; + assertFalse(e.getMessage(), e.getMessage().contains("Can't create cache file")); } } -- 2.39.5