use of com.opensymphony.xwork2.mock.DummyTextProvider in project struts by apache.
the class ObjectFactoryTest method setUp.
@Override
public void setUp() throws Exception {
super.setUp();
this.loadButAdd(TextProvider.class, new DummyTextProvider());
}
use of com.opensymphony.xwork2.mock.DummyTextProvider in project struts by apache.
the class ObjectFactoryTest method testCreatingActionsWithInjectableParametersInConstructor.
public void testCreatingActionsWithInjectableParametersInConstructor() throws Exception {
// given
ObjectFactory of = container.getInstance(ObjectFactory.class);
// when
InjectableAction action = (InjectableAction) of.buildBean(InjectableAction.class, new HashMap<String, Object>());
// then
assertNotNull(action.getTextProvider());
assertTrue(action.getTextProvider() instanceof DummyTextProvider);
}
Aggregations