@Test public void testGetAllRoles() { log.debug("entered 'testGetAllRoles' method"); Role role = new Role(Constants.ADMIN_ROLE); final List<Role> testData = new ArrayList<Role>(); testData.add(role); context.checking(new Expectations() {{ one(lookupDao).getRoles(); will(returnValue(testData)); }}); List<LabelValue> roles = mgr.getAllRoles(); assertTrue(roles.size() > 0); }
public List<LabelValue> getAllRoles() { List<Role> roles = dao.getRoles(); List<LabelValue> list = new ArrayList<LabelValue>(); for (Role role1 : roles) { list.add(new LabelValue(role1.getName(), role1.getName())); } return list; }
LookupManagerImpl extends UniversalManagerImpl implements LookupManager { public List<LabelValue> getAllRoles() { List<Role> roles = dao.getRoles(); List<LabelValue> list = new ArrayList<LabelValue>(); for (Role role1 : roles) { list.add(new LabelValue(role1.getName(), role1.getName())); } return list; } }
LookupManagerImpl extends UniversalManagerImpl implements LookupManager { public List<LabelValue> getAllRoles() { List<Role> roles = dao.getRoles(); List<LabelValue> list = new ArrayList<LabelValue>(); for (Role role1 : roles) { list.add(new LabelValue(role1.getName(), role1.getName())); } return list; }  }
LookupManagerImpl extends UniversalManagerImpl implements LookupManager { public List<LabelValue> getAllRoles() { List<Role> roles = dao.getRoles(); List<LabelValue> list = new ArrayList<LabelValue>(); for (Role role1 : roles) { list.add(new LabelValue(role1.getName(), role1.getName())); } return list; }  void setLookupDao(LookupDao dao); List<LabelValue> getAllRoles(); }
LookupManagerImpl extends UniversalManagerImpl implements LookupManager { public List<LabelValue> getAllRoles() { List<Role> roles = dao.getRoles(); List<LabelValue> list = new ArrayList<LabelValue>(); for (Role role1 : roles) { list.add(new LabelValue(role1.getName(), role1.getName())); } return list; }  void setLookupDao(LookupDao dao); List<LabelValue> getAllRoles();  }