/// <summary> /// Obtiene una lista de roles /// </summary> /// <param name="userName">Si se pasa userName = string.empty se traen todos los roles existentes</param> /// <returns></returns> public static RolList GetAllRoles(string userName) { SearchAllRolesReq req = new SearchAllRolesReq(); req.BusinessData.UserName = userName; SearchAllRolesRes res = req.ExecuteService <SearchAllRolesReq, SearchAllRolesRes>(WrapperSecurityProvider, req); if (res.Error != null) { throw Fwk.Exceptions.ExceptionHelper.ProcessException(res.Error); } return(res.BusinessData.RolList); }
public void SearchAllRoles_No_Service() { String strErrorResut = String.Empty; SearchAllRolesService svc = new SearchAllRolesService(); SearchAllRolesReq req = new SearchAllRolesReq(); try { SearchAllRolesRes res = svc.Execute(req); } catch (Exception ex) { strErrorResut = Fwk.Exceptions.ExceptionHelper.GetAllMessageException(ex); } Assert.AreEqual <String>(strErrorResut, string.Empty, strErrorResut); }
public void SearchAllRoles_No_Service() { String strErrorResut = String.Empty; SearchAllRolesService svc = new SearchAllRolesService(); SearchAllRolesReq req = new SearchAllRolesReq(); try { SearchAllRolesRes res = svc.Execute(req); } catch (Exception ex) { strErrorResut = Fwk.Exceptions.ExceptionHelper.GetAllMessageException(ex); } Assert.AreEqual<String>(strErrorResut, string.Empty, strErrorResut); }
/// <summary> /// Obtiene una lista de roles /// </summary> /// <param name="userName">Si se pasa userName = string.empty se traen todos los roles existentes</param> /// <returns></returns> public static RolList GetAllRoles(string userName) { SearchAllRolesReq req = new SearchAllRolesReq(); req.BusinessData.UserName = userName; SearchAllRolesRes res = req.ExecuteService<SearchAllRolesReq, SearchAllRolesRes>(WrapperSecurityProvider,req); if (res.Error != null) throw Fwk.Exceptions.ExceptionHelper.ProcessException(res.Error); return res.BusinessData.RolList; }