diff options
author | Dominik Stadler <centic@apache.org> | 2021-12-05 15:33:39 +0000 |
---|---|---|
committer | Dominik Stadler <centic@apache.org> | 2021-12-05 15:33:39 +0000 |
commit | d5538d24d83aa2feb67c57909211bfaae673c989 (patch) | |
tree | 5b60270a5bd0a74bffe17d96cb78af4bbda81e4b /poi-scratchpad/src/test | |
parent | a3967026a38f10c70692ef28d4e32d7b33625ec0 (diff) | |
download | poi-d5538d24d83aa2feb67c57909211bfaae673c989.tar.gz poi-d5538d24d83aa2feb67c57909211bfaae673c989.zip |
Apply IDE suggestions, adjust tests, ...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1895596 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi-scratchpad/src/test')
-rw-r--r-- | poi-scratchpad/src/test/java/org/apache/poi/hslf/usermodel/TestTextRun.java | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/poi-scratchpad/src/test/java/org/apache/poi/hslf/usermodel/TestTextRun.java b/poi-scratchpad/src/test/java/org/apache/poi/hslf/usermodel/TestTextRun.java index 3e51fb8f5d..46939beec4 100644 --- a/poi-scratchpad/src/test/java/org/apache/poi/hslf/usermodel/TestTextRun.java +++ b/poi-scratchpad/src/test/java/org/apache/poi/hslf/usermodel/TestTextRun.java @@ -46,6 +46,7 @@ import org.apache.poi.sl.usermodel.BaseTestSlideShow; import org.apache.poi.sl.usermodel.PlaceholderDetails; import org.apache.poi.util.LocaleUtil; import org.junit.jupiter.api.Test; +import org.opentest4j.AssertionFailedError; /** * Tests for TextRuns @@ -603,16 +604,21 @@ public final class TestTextRun { .mapToInt(r -> ((DateTimeMCAtom)r).getIndex()).toArray(); assertArrayEquals(expFormatId, actFormatId); - List<HSLFShapePlaceholderDetails> phs = shapes.stream().map(HSLFSimpleShape::getPlaceholderDetails).collect(Collectors.toList()); + List<HSLFShapePlaceholderDetails> phs = + shapes.stream().map(HSLFSimpleShape::getPlaceholderDetails).collect(Collectors.toList()); for (Map.Entry<Locale,String[]> me : formats.entrySet()) { LocaleUtil.setUserLocale(me.getKey()); - // refresh internal members - phs.forEach(PlaceholderDetails::getPlaceholder); + try { + // refresh internal members + phs.forEach(PlaceholderDetails::getPlaceholder); - String[] actDate = phs.stream().map(PlaceholderDetails::getDateFormat).map(ldt::format).toArray(String[]::new); - assertArrayEquals(me.getValue(), actDate); + String[] actDate = phs.stream().map(PlaceholderDetails::getDateFormat).map(ldt::format).toArray(String[]::new); + assertArrayEquals(me.getValue(), actDate); + } catch (AssertionFailedError e) { + throw new AssertionFailedError("While handling local " + me.getKey()); + } } } finally { LocaleUtil.resetUserLocale(); |