use of org.apereo.portal.layout.dlm.remoting.JsonEntityBean in project uPortal by Jasig.
the class JsonEntityBeanTest method testEqualsIdDiff.
@Test
public void testEqualsIdDiff() {
String val1 = "asdf";
String val2 = "brtd";
JsonEntityBean jeb1 = buildNullBean();
jeb1.setChildrenInitialized(true);
jeb1.setCreatorId("");
jeb1.setDescription("");
jeb1.setEntityType(EntityEnum.PORTLET);
jeb1.setId(val1);
JsonEntityBean jeb2 = buildNullBean();
jeb2.setChildrenInitialized(true);
jeb2.setCreatorId("");
jeb2.setDescription("");
jeb2.setEntityType(EntityEnum.PORTLET);
jeb2.setId(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 testEqualsDifferentClasses.
@Test
public void testEqualsDifferentClasses() {
JsonEntityBean jeb1 = buildNullBean();
assertFalse(jeb1.equals(""));
}
use of org.apereo.portal.layout.dlm.remoting.JsonEntityBean in project uPortal by Jasig.
the class JsonEntityBeanTest method testEqualsCreatorIdNullSource.
@Test
public void testEqualsCreatorIdNullSource() {
JsonEntityBean jeb1 = buildNullBean();
jeb1.setChildrenInitialized(true);
jeb1.setCreatorId(null);
JsonEntityBean jeb2 = buildNullBean();
jeb2.setChildrenInitialized(true);
jeb2.setCreatorId("");
assertFalse(jeb1.equals(jeb2));
}
use of org.apereo.portal.layout.dlm.remoting.JsonEntityBean in project uPortal by Jasig.
the class JsonEntityBeanTest method testCompareToDiffDesc.
@Test
public void testCompareToDiffDesc() {
String val1 = "asdf";
String val2 = "hjkl";
JsonEntityBean jeb1 = buildBeanFromEntityGroup();
jeb1.setDescription(val1);
JsonEntityBean jeb2 = buildBeanFromEntityGroup();
jeb2.setDescription(val2);
assertEquals(val1.compareTo(val2), jeb1.compareTo(jeb2));
}
use of org.apereo.portal.layout.dlm.remoting.JsonEntityBean in project uPortal by Jasig.
the class JsonEntityBeanTest method testEqualsNameNullSource.
@Test
public void testEqualsNameNullSource() {
JsonEntityBean jeb1 = buildNullBean();
jeb1.setChildrenInitialized(true);
jeb1.setCreatorId("");
jeb1.setDescription("");
jeb1.setEntityType(EntityEnum.PORTLET);
jeb1.setId("");
jeb1.setName(null);
JsonEntityBean jeb2 = buildNullBean();
jeb2.setChildrenInitialized(true);
jeb2.setCreatorId("");
jeb2.setDescription("");
jeb2.setEntityType(EntityEnum.PORTLET);
jeb2.setId("");
jeb2.setName("");
assertFalse(jeb1.equals(jeb2));
}
Aggregations