Search in sources :

Example 1 with InjectableAction

use of com.opensymphony.xwork2.mock.InjectableAction 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);
}
Also used : DummyTextProvider(com.opensymphony.xwork2.mock.DummyTextProvider) HashMap(java.util.HashMap) InjectableAction(com.opensymphony.xwork2.mock.InjectableAction)

Aggregations

DummyTextProvider (com.opensymphony.xwork2.mock.DummyTextProvider)1 InjectableAction (com.opensymphony.xwork2.mock.InjectableAction)1 HashMap (java.util.HashMap)1