use of org.pentaho.platform.web.http.security.RequestParameterAuthenticationFilter in project pentaho-platform by pentaho.
the class RequestParameterAuthenticationFilterTest method beforeTest.
@Before
public void beforeTest() throws KettleException, IOException {
KettleClientEnvironment.init();
filter = new RequestParameterAuthenticationFilter();
authManagerMock = mock(AuthenticationManager.class);
filter.setAuthenticationManager(authManagerMock);
final Properties properties = new Properties();
properties.setProperty("requestParameterAuthenticationEnabled", "true");
IConfiguration config = mock(IConfiguration.class);
ISystemConfig mockISystemConfig = mock(ISystemConfig.class);
mockISystemConfig.registerConfiguration(config);
filter.setSystemConfig(mockISystemConfig);
doReturn(config).when(mockISystemConfig).getConfiguration("security");
doReturn(properties).when(config).getProperties();
}
Aggregations