use of org.apereo.portal.layout.dlm.remoting.JsonEntityBean in project uPortal by Jasig.
the class JsonEntityBeanTest method testGetTypeAndIdHashEntityEnumNull.
@Test(expected = java.lang.AssertionError.class)
public void testGetTypeAndIdHashEntityEnumNull() {
EntityEnum ee = null;
JsonEntityBean jeb = buildBeanFromEntityGroup();
jeb.setEntityType(ee);
jeb.getTypeAndIdHash();
}
use of org.apereo.portal.layout.dlm.remoting.JsonEntityBean in project uPortal by Jasig.
the class JsonEntityBeanTest method testConstructFromGroupMemberWithGroup.
@Test(expected = IllegalArgumentException.class)
public void testConstructFromGroupMemberWithGroup() {
String key = "test-key";
Mockito.when(groupMember.getKey()).thenReturn(key);
JsonEntityBean jeb = new JsonEntityBean(groupMember, EntityEnum.GROUP);
}
use of org.apereo.portal.layout.dlm.remoting.JsonEntityBean in project uPortal by Jasig.
the class JsonEntityBeanTest method testConstructFromGroupMemberWithCategory.
@Test(expected = IllegalArgumentException.class)
public void testConstructFromGroupMemberWithCategory() {
String key = "test-key";
Mockito.when(groupMember.getKey()).thenReturn(key);
JsonEntityBean jeb = new JsonEntityBean(groupMember, EntityEnum.CATEGORY);
}
use of org.apereo.portal.layout.dlm.remoting.JsonEntityBean in project uPortal by Jasig.
the class JsonEntityBeanTest method testEquals.
@Test
public void testEquals() {
JsonEntityBean jeb1 = buildBeanFromEntityGroup();
JsonEntityBean jeb2 = buildBeanFromEntityGroup();
assertTrue(jeb1.equals(jeb2));
}
use of org.apereo.portal.layout.dlm.remoting.JsonEntityBean in project uPortal by Jasig.
the class JsonEntityBeanTest method testToString.
@Test
public void testToString() {
JsonEntityBean jeb1 = buildBeanFromEntityGroup();
assertEquals("JsonEntityBean [entityType=portlet, id=test-key, name=test-name, creatorId=test-creator-id, description=test-description, principalString=null]", jeb1.toString());
}
Aggregations