use of com.opensymphony.xwork2.config.providers.MockConfigurationProvider in project struts by apache.
the class DateRangeValidatorTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
loadConfigurationProviders(new MockConfigurationProvider());
}
use of com.opensymphony.xwork2.config.providers.MockConfigurationProvider in project struts by apache.
the class ExpressionValidatorTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
loadConfigurationProviders(new MockConfigurationProvider());
ActionConfig config = new ActionConfig.Builder("", "name", "").build();
ActionInvocation invocation = EasyMock.createNiceMock(ActionInvocation.class);
ActionProxy proxy = EasyMock.createNiceMock(ActionProxy.class);
EasyMock.expect(invocation.getProxy()).andReturn(proxy).anyTimes();
EasyMock.expect(invocation.getAction()).andReturn(null).anyTimes();
EasyMock.expect(invocation.invoke()).andReturn(Action.SUCCESS).anyTimes();
EasyMock.expect(proxy.getMethod()).andReturn("execute").anyTimes();
EasyMock.expect(proxy.getConfig()).andReturn(config).anyTimes();
EasyMock.replay(invocation);
EasyMock.replay(proxy);
ActionContext.getContext().withActionInvocation(invocation);
tpf = container.getInstance(TextProviderFactory.class);
}
use of com.opensymphony.xwork2.config.providers.MockConfigurationProvider in project struts by apache.
the class IntRangeValidatorTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
XmlConfigurationProvider provider = new StrutsXmlConfigurationProvider("xwork-test-beans.xml");
container.inject(provider);
loadConfigurationProviders(provider, new MockConfigurationProvider());
}
use of com.opensymphony.xwork2.config.providers.MockConfigurationProvider in project struts by apache.
the class ShortRangeValidatorTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
XmlConfigurationProvider provider = new StrutsXmlConfigurationProvider("xwork-test-beans.xml");
container.inject(provider);
loadConfigurationProviders(provider, new MockConfigurationProvider());
}
use of com.opensymphony.xwork2.config.providers.MockConfigurationProvider in project struts by apache.
the class ValidateAction method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
XmlConfigurationProvider provider = new StrutsXmlConfigurationProvider("xwork-test-beans.xml");
container.inject(provider);
loadConfigurationProviders(provider, new MockConfigurationProvider());
ActionConfig config = configuration.getRuntimeConfiguration().getActionConfig("", MockConfigurationProvider.PARAM_INTERCEPTOR_ACTION_NAME);
container.inject(config.getInterceptors().get(0).getInterceptor());
}
Aggregations