public void testButtonWithLabel() throws Exception { TestAction testAction = (TestAction) action; testAction.setFoo("bar"); ResetTag tag = new ResetTag(); tag.setPageContext(pageContext); tag.setLabel("mylabel"); tag.setType("button"); tag.setAlign("left"); tag.setName("myname"); tag.setValue("%{foo}"); tag.doStartTag(); tag.doEndTag(); verify(TextFieldTag.class.getResource("Reset-4.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 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 testImageSimple() 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.setDisabled("true"); tag.doStartTag(); tag.doEndTag(); verify(TextFieldTag.class.getResource("Reset-5.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")); }