@Override protected void setTextWithPos(final ValueWithPos<String> formatedEntry, final boolean fireEvents) { super.setTextWithPos(formatedEntry, fireEvents); if (bicInput != null && StringUtils.isEmpty(bicInput.getValue())) { final String bic = IbanUtil.getBicOfIban(formatedEntry.getValue()); if (StringUtils.isNotEmpty(bic)) { bicInput.setValue(bic); } } }
@Override protected void setTextWithPos(final ValueWithPos<String> formatedEntry) { super.setTextWithPos(formatedEntry); if (bicInput != null && StringUtils.isEmpty(bicInput.getValue())) { final String bic = IbanUtil.getBicOfIban(formatedEntry.getValue()); if (StringUtils.isNotEmpty(bic)) { bicInput.setValue(bic); } } }
/** * test iban to bic transformation. */ @Test public void testIbanToBic() { Assert.assertNull("iban to bic should be null", IbanUtil.getBicOfIban(null)); for (final Entry<String, String> entry : IbanUtilTestCases.getIbanToBic().entrySet()) { Assert.assertEquals("iban to bic failed", entry.getValue(), IbanUtil.getBicOfIban(entry.getKey())); } } }
/** * test iban to bic transformation. */ @Test public void testIbanToBic() { Assert.assertNull("iban to bic should be null", IbanUtil.getBicOfIban(null)); for (final Entry<String, String> entry : IbanUtilTestCases.getIbanToBic().entrySet()) { Assert.assertEquals("iban to bic failed", entry.getValue(), IbanUtil.getBicOfIban(entry.getKey())); } } }
final String valueBic = BeanPropertyReaderUtil.getNullSaveStringProperty(pvalue, this.fieldBic); final String bicOfIban = IbanUtil.getBicOfIban(valueIban);
final String valueBic = BeanPropertyReaderUtil.getNullSaveStringProperty(pvalue, this.fieldBic); final String bicOfIban = IbanUtil.getBicOfIban(valueIban);