use of org.apereo.portal.layout.dlm.remoting.JsonEntityBean in project uPortal by Jasig.
the class JsonEntityBeanTest method testCompareTo.
@Test
public void testCompareTo() {
JsonEntityBean jeb1 = buildBeanFromEntityGroup();
JsonEntityBean jeb2 = buildBeanFromEntityGroup();
assertEquals(0, jeb1.compareTo(jeb2));
}
use of org.apereo.portal.layout.dlm.remoting.JsonEntityBean in project uPortal by Jasig.
the class JsonEntityBeanTest method testEqualsNameNullTarget.
@Test
public void testEqualsNameNullTarget() {
JsonEntityBean jeb1 = buildNullBean();
jeb1.setChildrenInitialized(true);
jeb1.setCreatorId("");
jeb1.setDescription("");
jeb1.setEntityType(EntityEnum.PORTLET);
jeb1.setId("");
jeb1.setName("");
JsonEntityBean jeb2 = buildNullBean();
jeb2.setChildrenInitialized(true);
jeb2.setCreatorId("");
jeb2.setDescription("");
jeb2.setEntityType(EntityEnum.PORTLET);
jeb2.setId("");
jeb2.setName(null);
assertFalse(jeb1.equals(jeb2));
}
use of org.apereo.portal.layout.dlm.remoting.JsonEntityBean in project uPortal by Jasig.
the class JsonEntityBeanTest method testEqualsNameDiff.
@Test
public void testEqualsNameDiff() {
String val1 = "asdf";
String val2 = "brtd";
JsonEntityBean jeb1 = buildNullBean();
jeb1.setChildrenInitialized(true);
jeb1.setCreatorId("");
jeb1.setDescription("");
jeb1.setEntityType(EntityEnum.PORTLET);
jeb1.setId("");
jeb1.setName(val1);
JsonEntityBean jeb2 = buildNullBean();
jeb2.setChildrenInitialized(true);
jeb2.setCreatorId("");
jeb2.setDescription("");
jeb2.setEntityType(EntityEnum.PORTLET);
jeb2.setId("");
jeb2.setName(val2);
assertEquals(val1.equals(val2), jeb1.equals(jeb2));
}
use of org.apereo.portal.layout.dlm.remoting.JsonEntityBean in project uPortal by Jasig.
the class JsonEntityBeanTest method buildNullBean.
private JsonEntityBean buildNullBean() {
JsonEntityBean jeb = new JsonEntityBean(groupMember, EntityEnum.PORTLET);
EntityEnum ee = null;
jeb.setEntityType(ee);
jeb.setChildrenInitialized(false);
jeb.setCreatorId(null);
jeb.setDescription(null);
jeb.setId(null);
jeb.setName(null);
return jeb;
}
use of org.apereo.portal.layout.dlm.remoting.JsonEntityBean in project uPortal by Jasig.
the class JsonEntityBeanTest method testEqualsIdNullSource.
@Test
public void testEqualsIdNullSource() {
JsonEntityBean jeb1 = buildNullBean();
jeb1.setChildrenInitialized(true);
jeb1.setCreatorId("");
jeb1.setDescription("");
jeb1.setEntityType(EntityEnum.PORTLET);
jeb1.setId(null);
JsonEntityBean jeb2 = buildNullBean();
jeb2.setChildrenInitialized(true);
jeb2.setCreatorId("");
jeb2.setDescription("");
jeb2.setEntityType(EntityEnum.PORTLET);
jeb2.setId("");
assertFalse(jeb1.equals(jeb2));
}
Aggregations