192193194195196197198199200201202
replay(request); replay(session); InjectionWrapper inputWrapper = inputs.get("requiredAutoCreateSessionAttribute"); ActionContext injectionContext = new TestContextImpl(request); inputWrapper.inject(action, injectionContext); verify(request); verify(session);
218219220221222223224225226227228
replay(request); InjectionWrapper inputWrapper = inputs.get("autoCreateRequest"); ActionContext injectionContext = new TestContextImpl(request); inputWrapper.inject(action, injectionContext); verify(request); assert action.getAutoCreateRequest() != null;
246247248249250251252253254255256
replay(request); InjectionWrapper inputWrapper = inputs.get("nonAutoCreateRequest"); ActionContext injectionContext = new TestContextImpl(request); inputWrapper.inject(action, injectionContext); verify(request); assert action.getAutoCreateRequest() == null;
130131132133134135136137138139140
replay(servlet); replay(context); replay(messageResources); replay(form); ViewAdapter viewAdapter = action.executeAction(actionBean, new TestContextImpl(request, null, null, form, mapping)); ActionForwardViewAdapter va = (ActionForwardViewAdapter) viewAdapter; assert (va.getActionForward() == actionForward); verify(actionBean);
196197198199200201202203204205206
replay(context); replay(messageResources); try { action.executeAction(actionBean, new TestContextImpl(request, null, null, null, mapping)); } catch (ApplicationRuntimeException e) { Assert .assertEquals(e.getMessage(),
240241242243244245246247248249250
replay(actionBean); replay(mapping); replay(request); ViewAdapter viewAdapter = action.executeAction(actionBean, new TestContextImpl(request, null, null, null, mapping)); ActionForwardViewAdapter va = (ActionForwardViewAdapter) viewAdapter; assert (va.getActionForward() == actionForward); verify(actionBean);
8586878889909192939495
replay(actionBean); replay(mapping); replay(form); replay(request); ViewAdapter viewAdapter = action.executeAction(actionBean, new TestContextImpl(request, null, null, form, mapping)); ActionForwardViewAdapter va = (ActionForwardViewAdapter) viewAdapter; assert (va.getActionForward() == actionForward); verify(actionBean);
118119120121122123124125126127128
151152153154155156157158159160161
184185186187188189190191192193194