use of org.apereo.portal.layout.dlm.remoting.GroupListHelperImpl in project uPortal by Jasig.
the class GroupListHelperImplTest method testGetPrincipalForEntityTypeIsNull.
@Test(expected = IllegalArgumentException.class)
public void testGetPrincipalForEntityTypeIsNull() {
GroupListHelperImpl helper = new GroupListHelperImpl();
Mockito.when(entityGroup.getKey()).thenReturn("test-key");
Mockito.when(entityGroup.getName()).thenReturn("test-name");
Mockito.when(entityGroup.getCreatorID()).thenReturn("test-cid");
Mockito.when(entityGroup.getDescription()).thenReturn("test-desc");
JsonEntityBean jeb = new JsonEntityBean(entityGroup, EntityEnum.PORTLET);
EntityEnum ee = null;
jeb.setEntityType(ee);
helper.getPrincipalForEntity(jeb);
}
use of org.apereo.portal.layout.dlm.remoting.GroupListHelperImpl in project uPortal by Jasig.
the class GroupListHelperImplTest method testLookupEntityNameNull.
@Test(expected = IllegalArgumentException.class)
public void testLookupEntityNameNull() {
GroupListHelperImpl helper = new GroupListHelperImpl();
helper.lookupEntityName(null);
}
use of org.apereo.portal.layout.dlm.remoting.GroupListHelperImpl in project uPortal by Jasig.
the class GroupListHelperImplTest method testLookupEntityNameTypeIsNull.
@Test(expected = IllegalArgumentException.class)
public void testLookupEntityNameTypeIsNull() {
GroupListHelperImpl helper = new GroupListHelperImpl();
Mockito.when(entityGroup.getKey()).thenReturn("test-key");
Mockito.when(entityGroup.getName()).thenReturn("test-name");
Mockito.when(entityGroup.getCreatorID()).thenReturn("test-cid");
Mockito.when(entityGroup.getDescription()).thenReturn("test-desc");
JsonEntityBean jeb = new JsonEntityBean(entityGroup, EntityEnum.PORTLET);
EntityEnum ee = null;
jeb.setEntityType(ee);
helper.lookupEntityName(jeb);
}
use of org.apereo.portal.layout.dlm.remoting.GroupListHelperImpl in project uPortal by Jasig.
the class GroupListHelperImplTest method testGetEntityTypesForGroupTypeGroup.
@Test
public void testGetEntityTypesForGroupTypeGroup() {
GroupListHelperImpl helper = new GroupListHelperImpl();
Set<String> res = helper.getEntityTypesForGroupType(EntityEnum.GROUP.name());
assertEquals(2, res.size());
assertTrue(res.contains(EntityEnum.GROUP.name()));
assertTrue(res.contains(EntityEnum.PERSON.toString()));
}
use of org.apereo.portal.layout.dlm.remoting.GroupListHelperImpl in project uPortal by Jasig.
the class GroupListHelperImplTest method testGetEntityNull.
@Test(expected = IllegalArgumentException.class)
public void testGetEntityNull() {
GroupListHelperImpl helper = new GroupListHelperImpl();
helper.getEntity(null, "asdf", true);
}
Aggregations