bug 58775: use assertNotBuiltInFormat

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1721902 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Javen O'Neal 2015-12-28 12:13:17 +00:00
parent 0ef05fcdab
commit 3204cedf28
1 changed files with 4 additions and 2 deletions

View File

@ -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));
}
/**