Beispiel #1
0
        /// <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);
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
         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);

        }
Beispiel #4
0
        /// <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;
        }