예제 #1
0
  public String noStack() {
    ValueStack stack = ActionContext.getContext().getValueStack();
    // Action + DefaultTextProvider on the stack
    Assert.assertEquals(2, stack.size());
    Assert.assertNull(stack.findValue(ActionNestingTest.KEY));
    Assert.assertEquals(
        ActionNestingTest.NESTED_VALUE, stack.findValue(ActionNestingTest.NESTED_KEY));

    return SUCCESS;
  }
예제 #2
0
  public String stack() {
    ValueStack stack = ActionContext.getContext().getValueStack();
    // DefaultTextProvider, NestedActionTest pushed on by the test, and the NestedAction
    Assert.assertEquals(3, stack.size());
    Assert.assertNotNull(stack.findValue(ActionNestingTest.KEY));
    Assert.assertEquals(
        ActionContext.getContext().getValueStack().findValue(ActionNestingTest.KEY),
        ActionNestingTest.VALUE);
    Assert.assertEquals(
        ActionNestingTest.NESTED_VALUE, stack.findValue(ActionNestingTest.NESTED_KEY));

    return SUCCESS;
  }