From: PJ Fanning Date: Sat, 19 Feb 2022 11:41:46 +0000 (+0000) Subject: rework test X-Git-Tag: REL_5_2_1~71 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4998436a00da6816d76ca31862ff2274ee9f53ce;p=poi.git rework test git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1898212 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/poi-scratchpad/src/test/java/org/apache/poi/hmef/attribute/TestTNEFAttributes.java b/poi-scratchpad/src/test/java/org/apache/poi/hmef/attribute/TestTNEFAttributes.java index 7d8869988e..d644debe5c 100644 --- a/poi-scratchpad/src/test/java/org/apache/poi/hmef/attribute/TestTNEFAttributes.java +++ b/poi-scratchpad/src/test/java/org/apache/poi/hmef/attribute/TestTNEFAttributes.java @@ -19,7 +19,7 @@ package org.apache.poi.hmef.attribute; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.assertThrows; import java.io.ByteArrayInputStream; import java.io.IOException; @@ -55,11 +55,10 @@ public final class TestTNEFAttributes { @Test void testMalformedTNEF() throws Exception { try (InputStream is = _samples.openResourceAsStream("oom.tnef")) { - quick = new HMEFMessage(is); - } catch (Exception e) { - assertTrue(e instanceof IOException); + assertThrows(IOException.class, ()-> new HMEFMessage(is)); } } + /** * Test counts */