use of org.apereo.portal.layout.dlm.remoting.JsonEntityBean in project uPortal by Jasig.
the class PermissionAdministrationHelperTest method buildJsonGroupEntityBean.
private JsonEntityBean buildJsonGroupEntityBean() {
JsonEntityBean groupBean = new JsonEntityBean();
groupBean.setEntityType(EntityEnum.GROUP.toString());
groupBean.setId("group101");
groupBean.setName("test");
groupBean.setDescription("Testing group bean");
return groupBean;
}
use of org.apereo.portal.layout.dlm.remoting.JsonEntityBean in project uPortal by Jasig.
the class PermissionAdministrationHelperTest method testGetPrincipalsForEntities.
@Test(expected = NullPointerException.class)
public void testGetPrincipalsForEntities() {
JsonEntityBean bean = buildJsonGroupEntityBean();
List<JsonEntityBean> beans = new ArrayList<JsonEntityBean>();
beans.add(bean);
Set<JsonEntityBean> returnBeans = permissionAdministrationHelper.getEntitiesForPrincipals(null);
}
use of org.apereo.portal.layout.dlm.remoting.JsonEntityBean in project uPortal by Jasig.
the class EntitiesRESTControllerTest method testFindEntityNull.
@Test
public void testFindEntityNull() {
Mockito.when(groupListHelper.getEntity(null, null, true)).thenReturn(null);
JsonEntityBean entityBean = entitiesRESTController.findEntity(req, res, null, null);
Assert.assertNull(entityBean);
}
use of org.apereo.portal.layout.dlm.remoting.JsonEntityBean in project uPortal by Jasig.
the class EntitiesRESTControllerTest method testFindEntityEmpty.
@Test
public void testFindEntityEmpty() {
Mockito.when(groupListHelper.getEntity("", "", true)).thenReturn(null);
JsonEntityBean entityBean = entitiesRESTController.findEntity(req, res, "", "");
Assert.assertNull(entityBean);
}
use of org.apereo.portal.layout.dlm.remoting.JsonEntityBean in project uPortal by Jasig.
the class PrincipalsRESTControllerTest method buildJsonPersonEntityBean.
private JsonEntityBean buildJsonPersonEntityBean() {
JsonEntityBean personBean = new JsonEntityBean();
personBean.setEntityType(EntityEnum.GROUP.toString());
personBean.setId("person101");
personBean.setName("test");
personBean.setDescription("Testing person bean");
return personBean;
}
Aggregations