Package org.springframework.format.number

Examples of org.springframework.format.number.PercentFormatter


    assertEquals(Tag.EVAL_PAGE, action);
    assertEquals("", ((MockHttpServletResponse) context.getResponse()).getContentAsString());
  }

  public void testPrintFormattedScopedAttributeResult() throws Exception {
    PercentFormatter formatter = new PercentFormatter();
    tag.setExpression("bean.formattable");
    int action = tag.doStartTag();
    assertEquals(Tag.EVAL_BODY_INCLUDE, action);
    action = tag.doEndTag();
    assertEquals(Tag.EVAL_PAGE, action);
    assertEquals(formatter.print(new BigDecimal(".25"), Locale.getDefault()),
        ((MockHttpServletResponse) context.getResponse()).getContentAsString());
  }
View Full Code Here

TOP

Related Classes of org.springframework.format.number.PercentFormatter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.