use of org.apereo.portal.layout.dlm.remoting.registry.v43.PortletCategoryBean in project uPortal by Jasig.
the class PortletCategoryBeanTest method testHashCode.
@Test
public void testHashCode() {
String id = "id_test";
String name = "name_test";
String desc = "desc_test";
PortletCategoryBean pcb1 = buildTestPortletCategoryBean(id, name, desc);
PortletCategoryBean pcb2 = buildTestPortletCategoryBean(id, name, desc);
assertEquals(pcb1.hashCode(), pcb2.hashCode());
}
use of org.apereo.portal.layout.dlm.remoting.registry.v43.PortletCategoryBean in project uPortal by Jasig.
the class PortletCategoryBeanTest method testEqualsSelf.
@Test
public void testEqualsSelf() {
PortletCategoryBean pcb1 = buildTestPortletCategoryBean("id1", "name1", "desc");
assertTrue(pcb1.equals(pcb1));
}
use of org.apereo.portal.layout.dlm.remoting.registry.v43.PortletCategoryBean in project uPortal by Jasig.
the class PortletCategoryBeanTest method buildTestCategorySet.
private Set<PortletCategoryBean> buildTestCategorySet(String id, String name, String desc) {
PortletCategory pc = new PortletCategory(id);
pc.setName(name);
pc.setDescription(desc);
PortletCategoryBean pcb = PortletCategoryBean.fromPortletCategory(pc, null, null);
Set<PortletCategoryBean> testCategorySet = new TreeSet<>();
testCategorySet.add(pcb);
return testCategorySet;
}
use of org.apereo.portal.layout.dlm.remoting.registry.v43.PortletCategoryBean in project uPortal by Jasig.
the class PortletCategoryBeanTest method testEqualsOtherObject.
@Test
public void testEqualsOtherObject() {
PortletCategoryBean pcb1 = buildTestPortletCategoryBean("id1", "name1", "desc");
assertFalse(pcb1.equals("id1"));
}
use of org.apereo.portal.layout.dlm.remoting.registry.v43.PortletCategoryBean in project uPortal by Jasig.
the class PortletCategoryBeanTest method testfromPortletCategoryNullSubCatsAndPortlets.
@Test
public void testfromPortletCategoryNullSubCatsAndPortlets() {
String id = "id_test";
String name = "id_test";
String desc = "desc_test";
PortletCategory pc = new PortletCategory(id);
pc.setName(name);
pc.setDescription(desc);
PortletCategoryBean pcb = PortletCategoryBean.fromPortletCategory(pc, null, null);
assertEquals(id, pcb.getId());
assertEquals(name, pcb.getName());
assertEquals(desc, pcb.getDescription());
assertEquals(Collections.emptySet(), pcb.getPortlets());
assertEquals(Collections.emptySet(), pcb.getSubcategories());
}
Aggregations