Exemplo n.º 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;
  }
Exemplo n.º 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;
  }