@Override public void formatValue(final ValueWithPos<String> pvalue, final boolean fireEvents) { setTextWithPos(IsbnUtil.isbnFormatWithPos(pvalue), fireEvents); }
@Override public void formatValue(final ValueWithPos<String> pvalue) { setTextWithPos(IsbnUtil.isbnFormatWithPos(pvalue)); }
/** * test formating isbn with position. */ @Test public void testIsbnFormatWithPos() { Assert.assertNull("isbn format should be null", IsbnUtil.isbnFormatWithPos(null)); for (final Entry<ValueWithPos<String>, ValueWithPos<String>> entry : IsbnUtilTestCases .getIsbnFormatWithPosCases().entrySet()) { Assert.assertEquals("isbn format failed", entry.getKey(), IsbnUtil.isbnFormatWithPos(entry.getValue())); } }
/** * test formating isbn with position. */ @Test public void testIsbnFormatWithPos() { Assert.assertNull("isbn format should be null", IsbnUtil.isbnFormatWithPos(null)); for (final Entry<ValueWithPos<String>, ValueWithPos<String>> entry : IsbnUtilTestCases .getIsbnFormatWithPosCases().entrySet()) { Assert.assertEquals("isbn format failed", entry.getKey(), IsbnUtil.isbnFormatWithPos(entry.getValue())); } }