Skip to content

Instantly share code, notes, and snippets.

@albans
albans / ActionTestHelper.java
Created June 18, 2012 13:21
Helper class for testing struts2 actions. The static block does the minimum wiring to avoid getText to crash. The inject method is helpful for injecting parameters to the tested action.
import static org.mockito.Matchers.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import java.lang.reflect.InvocationTargetException;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;