diff options
author | PJ Fanning <fanningpj@apache.org> | 2022-02-19 11:41:46 +0000 |
---|---|---|
committer | PJ Fanning <fanningpj@apache.org> | 2022-02-19 11:41:46 +0000 |
commit | 4998436a00da6816d76ca31862ff2274ee9f53ce (patch) | |
tree | e32a71bcd189343187945bbedae15fb1ecf04de6 /poi-scratchpad | |
parent | 1fa2dcd8ecb035f6cf577af5dbcbfa031f7fc715 (diff) | |
download | poi-4998436a00da6816d76ca31862ff2274ee9f53ce.tar.gz poi-4998436a00da6816d76ca31862ff2274ee9f53ce.zip |
rework test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1898212 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi-scratchpad')
-rw-r--r-- | poi-scratchpad/src/test/java/org/apache/poi/hmef/attribute/TestTNEFAttributes.java | 7 |
1 files 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 */ |