1 7 package com.inversoft.verge.mvc.view.jsp.error.test; 8 9 10 import javax.servlet.jsp.tagext.TagData ; 11 import javax.servlet.jsp.tagext.VariableInfo ; 12 13 import junit.framework.TestCase; 14 15 import com.inversoft.verge.mvc.view.jsp.error.HasErrorsTei; 16 17 18 27 public class HasErrorsTeiTest extends TestCase { 28 29 34 public HasErrorsTeiTest(String name) { 35 super(name); 36 } 37 38 39 42 public void testAll() { 43 HasErrorsTei tei = new HasErrorsTei(); 44 TagData data = new TagData (new Object [][]{{"var", "foo"}}); 45 VariableInfo [] infos = tei.getVariableInfo(data); 46 47 assertEquals(1, infos.length); 48 assertEquals("foo", infos[0].getVarName()); 49 assertEquals("java.lang.Object", infos[0].getClassName()); 50 assertTrue(infos[0].getDeclare()); 51 assertEquals(VariableInfo.AT_BEGIN, infos[0].getScope()); 52 } 53 } | Popular Tags |