From 4998436a00da6816d76ca31862ff2274ee9f53ce Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Sat, 19 Feb 2022 11:41:46 +0000 Subject: [PATCH] rework test git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1898212 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/poi/hmef/attribute/TestTNEFAttributes.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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 */ -- 2.39.5