1 16 package org.apache.myfaces.el; 17 18 import junit.framework.TestCase; 19 20 21 26 public class ELParserHelperTest extends TestCase 27 { 28 30 public ELParserHelperTest(String name) 31 { 32 super(name); 33 } 34 35 37 public void testToJspElExpression() throws Exception 38 { 39 assertEquals("${}", ELParserHelper.toJspElExpression("#{}")); 40 assertEquals("{}", ELParserHelper.toJspElExpression("{}")); 41 assertEquals("{aa} {bb}", ELParserHelper.toJspElExpression("{aa} {bb}")); 42 assertEquals("{aa}{bb}", ELParserHelper.toJspElExpression("{aa}{bb}")); 43 assertEquals("1${'<'}{0,number,integer}", ELParserHelper.toJspElExpression("1#{'<'}{0,number,integer}")); 44 45 assertEquals( 46 "{0,choice,0#${scrollerNoItem_}|1#${scrollerOneItem_}|1${'<'}{0,number,integer} ${scrollerItems_}} ${dataScrollerMsg.found_displaying} {1} to {2}. ${dataScrollerMsg.Page} {3} / {4}", 47 ELParserHelper.toJspElExpression("{0,choice,0##{scrollerNoItem_}|1##{scrollerOneItem_}|1#{'<'}{0,number,integer} #{scrollerItems_}} #{dataScrollerMsg.found_displaying} {1} to {2}. #{dataScrollerMsg.Page} {3} / {4}")); 48 } 49 50 } | Popular Tags |