예제 #1
0
  @Test
  public void testConversionOfSpecialCharsToUnicodeCharsForXmlDownload() {
    String specialChars =
        "₂ α β γ δ ² ° ◦ µ λ ƛ ≥ ≤ ± κ ℯ Κ < > ‡";

    String unicodeChars = StringUtils.updateXMLDataForSpecialCharacters(specialChars);

    String expectedUnicodeChars =
        "\u2082 \u03B1 \u03B2 \u03B3 \u03B4 \u00B2 \u00B0 \u00B0 \u00B5 \u03BB \u03BB \u2265 \u2264 \u00B1 \u03BA \u212F \u03BA < > \u2021";

    assertTrue(unicodeChars.equals(expectedUnicodeChars));
  }
    protected Object mapRow(ResultSet rs, int rownum) throws SQLException {

      return new Boolean(StringUtils.toBoolean((String) rs.getString(1)));
    }