예제 #1
0
  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"));
  }
예제 #2
0
  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"));
  }
예제 #3
0
  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"));
  }