/** @see {@link OpenmrsObjectSaveHandler#handle(OpenmrsObject,User,Date,String)} */ @Test @Verifies( value = "set empty string properties to null", method = "handle(OpenmrsObject,User,Date,String)") public void handle_shouldSetEmptyStringPropertiesToNull() { Role role = new Role(); role.setName(""); role.setDescription(""); role.setRole(""); new OpenmrsObjectSaveHandler().handle(role, null, null, null); Assert.assertNull(role.getName()); Assert.assertNull(role.getDescription()); Assert.assertNull(role.getRole()); }
public LazyRole(Role role) { setName(role.getName()); setChangedBy(role.getChangedBy()); setChildRoles(role.getChildRoles()); setCreator(role.getCreator()); setDateChanged(role.getDateChanged()); setDateCreated(role.getDateCreated()); setDateRetired(role.getDateRetired()); setDescription(role.getDescription()); setInheritedRoles(role.getInheritedRoles()); setPrivileges(role.getPrivileges()); setRetired(role.getRetired()); setRetiredBy(role.getRetiredBy()); setRetireReason(role.getRetireReason()); setRole(role.getRole()); setUuid(role.getUuid()); }