use of org.apache.pluto.container.om.portlet.impl.InitParamType in project uPortal by Jasig.
the class FilterConfigImplTest method testParams.
@Test
public void testParams() {
final List<InitParamType> initParams = new ArrayList<InitParamType>();
InitParamType p1 = new InitParamType();
p1.setParamName("param1");
p1.setParamValue("value1");
InitParamType p2 = new InitParamType();
p2.setParamName("param2");
p2.setParamValue("value2");
initParams.add(p1);
initParams.add(p2);
final String filterName = "filterWithParams";
PortletContext portletContext = EasyMock.createMock(PortletContext.class);
EasyMock.replay(portletContext);
FilterConfigImpl impl = new FilterConfigImpl(filterName, initParams, portletContext);
Assert.assertEquals(filterName, impl.getFilterName());
Assert.assertEquals("value1", impl.getInitParameter("param1"));
Assert.assertEquals("value2", impl.getInitParameter("param2"));
Assert.assertNotNull(impl.getPortletContext());
}
use of org.apache.pluto.container.om.portlet.impl.InitParamType in project uPortal by Jasig.
the class FilterConfigImplTest method testControl.
@Test
public void testControl() {
final List<InitParamType> initParams = new ArrayList<InitParamType>();
final String filterName = "controlFilter";
PortletContext portletContext = EasyMock.createMock(PortletContext.class);
EasyMock.replay(portletContext);
FilterConfigImpl impl = new FilterConfigImpl(filterName, initParams, portletContext);
Assert.assertEquals(filterName, impl.getFilterName());
Assert.assertNull(impl.getInitParameter("someparam"));
Assert.assertNull(impl.getInitParameter("someparam2"));
Assert.assertNotNull(impl.getPortletContext());
}
Aggregations