use of org.simbasecurity.core.service.manager.dto.RoleDTO in project simba-os by cegeka.
the class RoleDTOAssemblerTest method testAssembleSingleRole.
@Test
public void testAssembleSingleRole() {
Role role = new RoleEntity("role name");
RoleDTO roleData = RoleDTOAssembler.assemble(role);
assertNotNull(roleData);
assertEquals(0, roleData.getId());
assertEquals(role.getName(), roleData.getName());
assertEquals(0, role.getId());
assertEquals(0, role.getVersion());
}
use of org.simbasecurity.core.service.manager.dto.RoleDTO in project simba-os by cegeka.
the class RoleDTOAssemblerTest method testAssembleMultipleRoles.
@Test
public void testAssembleMultipleRoles() {
Role role = new RoleEntity("role name");
Collection<RoleDTO> roleDataList = RoleDTOAssembler.assemble(Arrays.asList(role));
assertNotNull(roleDataList);
assertEquals(1, roleDataList.size());
}
use of org.simbasecurity.core.service.manager.dto.RoleDTO in project simba-os by cegeka.
the class RoleDTOAssembler method assemble.
public static RoleDTO assemble(Role role) {
RoleDTO roleDTO = new RoleDTO();
applyVersionAndId((AbstractVersionedEntity) role, roleDTO);
roleDTO.setName(role.getName());
return roleDTO;
}
Aggregations