use of org.apereo.portal.portlet.om.IPortletType in project uPortal by Jasig.
the class PortletAdministrationHelperTest method updateFormForSinglePortletTypeNoOpWhenMultiplePortletTypes.
/**
* When there are multiple available portlet types, the method
* updateFormForSinglePortletType(...) is a no-op returning null.
*
* <p>This test case verifies that the method returns null in this case.
*/
@Test
public void updateFormForSinglePortletTypeNoOpWhenMultiplePortletTypes() {
PortletAdministrationHelper helper = new PortletAdministrationHelper();
Map<IPortletType, PortletPublishingDefinition> portletDefinitions = new HashMap<>();
IPortletType someType = new PortletTypeImpl("someType", "someUri");
IPortletType someOtherType = new PortletTypeImpl("someOtherType", "someOtherUri");
PortletPublishingDefinition someDefinition = new PortletPublishingDefinition();
PortletPublishingDefinition someOtherDefinition = new PortletPublishingDefinition();
portletDefinitions.put(someType, someDefinition);
portletDefinitions.put(someOtherType, someOtherDefinition);
PortletDefinitionForm form = new PortletDefinitionForm();
assertNull(helper.updateFormForSinglePortletType(portletDefinitions, form));
}
Aggregations