public void testButtonSimple() throws Exception { TestAction testAction = (TestAction) action; testAction.setFoo("bar"); ResetTag tag = new ResetTag(); tag.setPageContext(pageContext); tag.setType("button"); tag.setName("myname"); tag.setValue("%{foo}"); tag.doStartTag(); tag.doEndTag(); verify(TextFieldTag.class.getResource("Reset-3.txt")); }
public void testSimple() throws Exception { TestAction testAction = (TestAction) action; testAction.setFoo("bar"); ResetTag tag = new ResetTag(); tag.setPageContext(pageContext); tag.setLabel("mylabel"); tag.setAlign("left"); tag.setName("myname"); tag.setValue("%{foo}"); tag.doStartTag(); tag.doEndTag(); verify(TextFieldTag.class.getResource("Reset-1.txt")); }
public void testDefaultValues() throws Exception { TestAction testAction = (TestAction) action; testAction.setFoo("bar"); ResetTag tag = new ResetTag(); tag.setPageContext(pageContext); tag.setLabel("mylabel"); tag.setName("myname"); tag.setTitle("mytitle"); tag.setSrc("/images/test.png"); tag.doStartTag(); tag.doEndTag(); verify(TextFieldTag.class.getResource("Reset-2.txt")); }
public void testImageWithExpressionSrc() throws Exception { TestAction testAction = (TestAction) action; testAction.setFoo("bar"); ResetTag tag = new ResetTag(); tag.setPageContext(pageContext); tag.setType("button"); tag.setName("myname"); tag.setLabel("mylabel"); tag.setValue("%{foo}"); tag.setSrc("%{getText(\"some.image.from.properties\")}"); tag.doStartTag(); tag.doEndTag(); verify(TextFieldTag.class.getResource("Reset-6.txt")); }
public void testSimpleThemeImageUsingMethodOnly() throws Exception { TestAction testAction = (TestAction) action; testAction.setFoo("bar"); ResetTag tag = new ResetTag(); tag.setPageContext(pageContext); tag.setTheme("simple"); tag.setType("button"); tag.setName("myname"); tag.setLabel("mylabel"); tag.setAction(null); // no action tag.setMethod("update"); tag.setAlign("left"); tag.doStartTag(); tag.doEndTag(); verify(TextFieldTag.class.getResource("Reset-9.txt")); }