From: Javen O'Neal Date: Mon, 28 Dec 2015 12:13:17 +0000 (+0000) Subject: bug 58775: use assertNotBuiltInFormat X-Git-Tag: REL_3_14_FINAL~163 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=20b3a7bd485a7ba7cc8f6619ad8b52f14fcc7374;p=poi.git bug 58775: use assertNotBuiltInFormat git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1721902 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFDataFormat.java b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFDataFormat.java index d7d77d8297..b14c6bdf30 100644 --- a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFDataFormat.java +++ b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFDataFormat.java @@ -45,9 +45,11 @@ public final class TestXSSFDataFormat extends BaseTestDataFormat { // now create a custom format with Pound (\u00a3) DataFormat dataFormat = wb.createDataFormat(); - short customFmtIdx = dataFormat.getFormat("\u00a3##.00[Yellow]"); + String customFmt = "\u00a3##.00[Yellow]"; + assertNotBuiltInFormat(customFmt); + short customFmtIdx = dataFormat.getFormat(customFmt); assertTrue(customFmtIdx > BuiltinFormats.FIRST_USER_DEFINED_FORMAT_INDEX ); - assertEquals("\u00a3##.00[Yellow]", dataFormat.getFormat(customFmtIdx)); + assertEquals(customFmt, dataFormat.getFormat(customFmtIdx)); } /**