Search in sources :

Example 11 with GroupListHelperImpl

use of org.apereo.portal.layout.dlm.remoting.GroupListHelperImpl in project uPortal by Jasig.

the class GroupListHelperImplTest method testGetPrincipalForEntityNull.

@Test(expected = IllegalArgumentException.class)
public void testGetPrincipalForEntityNull() {
    GroupListHelperImpl helper = new GroupListHelperImpl();
    helper.getPrincipalForEntity(null);
}
Also used : GroupListHelperImpl(org.apereo.portal.layout.dlm.remoting.GroupListHelperImpl) Test(org.junit.Test)

Example 12 with GroupListHelperImpl

use of org.apereo.portal.layout.dlm.remoting.GroupListHelperImpl in project uPortal by Jasig.

the class GroupListHelperImplTest method testGetEntityTypeNull.

@Test(expected = IllegalArgumentException.class)
public void testGetEntityTypeNull() {
    GroupListHelperImpl helper = new GroupListHelperImpl();
    helper.getEntityType(null);
}
Also used : GroupListHelperImpl(org.apereo.portal.layout.dlm.remoting.GroupListHelperImpl) Test(org.junit.Test)

Example 13 with GroupListHelperImpl

use of org.apereo.portal.layout.dlm.remoting.GroupListHelperImpl in project uPortal by Jasig.

the class GroupListHelperImplTest method testGetEntityBeansEmpty.

@Test
public void testGetEntityBeansEmpty() {
    GroupListHelperImpl helper = new GroupListHelperImpl();
    assertEquals(Collections.EMPTY_LIST, helper.getEntityBeans(new ArrayList<String>()));
}
Also used : GroupListHelperImpl(org.apereo.portal.layout.dlm.remoting.GroupListHelperImpl) ArrayList(java.util.ArrayList) Test(org.junit.Test)

Example 14 with GroupListHelperImpl

use of org.apereo.portal.layout.dlm.remoting.GroupListHelperImpl in project uPortal by Jasig.

the class GroupListHelperImplTest method testGetEntityTypePortlet.

@Test
public void testGetEntityTypePortlet() {
    GroupListHelperImpl helper = new GroupListHelperImpl();
    IGroupMember mocked = manuallyMockGroupMember(IPortletDefinition.class);
    EntityEnum ee = helper.getEntityType(mocked);
    assertEquals("portlet", ee.toString());
}
Also used : IGroupMember(org.apereo.portal.groups.IGroupMember) EntityEnum(org.apereo.portal.portlets.groupselector.EntityEnum) GroupListHelperImpl(org.apereo.portal.layout.dlm.remoting.GroupListHelperImpl) Test(org.junit.Test)

Example 15 with GroupListHelperImpl

use of org.apereo.portal.layout.dlm.remoting.GroupListHelperImpl in project uPortal by Jasig.

the class GroupListHelperImplTest method testGetEntityTypeCategory.

@Test
public void testGetEntityTypeCategory() {
    GroupListHelperImpl helper = new GroupListHelperImpl();
    MockedGroupMemberEntityGroup mocked = new MockedGroupMemberEntityGroup(IPortletDefinition.class);
    EntityEnum ee = helper.getEntityType(mocked);
    assertEquals("category", ee.toString());
}
Also used : EntityEnum(org.apereo.portal.portlets.groupselector.EntityEnum) GroupListHelperImpl(org.apereo.portal.layout.dlm.remoting.GroupListHelperImpl) Test(org.junit.Test)

Aggregations

GroupListHelperImpl (org.apereo.portal.layout.dlm.remoting.GroupListHelperImpl)18 Test (org.junit.Test)18 EntityEnum (org.apereo.portal.portlets.groupselector.EntityEnum)4 JsonEntityBean (org.apereo.portal.layout.dlm.remoting.JsonEntityBean)2 ArrayList (java.util.ArrayList)1 IGroupMember (org.apereo.portal.groups.IGroupMember)1