use of org.simbasecurity.api.service.thrift.ActionType in project simba-os by cegeka.
the class DoFilterAndSetPrincipalActionTest method testExecute_withoutPrincipal.
@Test
public void testExecute_withoutPrincipal() throws Exception {
FilterChain filterChain = mock(FilterChain.class);
ActionDescriptor actionDescriptor = new ActionDescriptor(new HashSet<ActionType>(), new HashMap<String, String>(), null, null, null, null);
actionDescriptor.getActionTypes().add(ActionType.DO_FILTER_AND_SET_PRINCIPAL);
DoFilterAndSetPrincipalAction action = new DoFilterAndSetPrincipalAction(actionDescriptor);
action.setRequest(request);
action.setResponse(response);
action.setFilterChain(filterChain);
action.execute();
verify(filterChain).doFilter(request, response);
}
Aggregations