Exemplo n.º 1
0
        public void SearchRolesForUser_No_Service()
        {
            String strErrorResut = String.Empty;

            SearchRolesForUserService svc = new SearchRolesForUserService();
            SearchRolesForUserReq     req = new SearchRolesForUserReq();

            List <User> userList = Fwk.Security.FwkMembership.GetAllUsers(null);

            if (userList.Count > 0)
            {
                req.BusinessData.Username = userList[0].UserName;
            }
            else
            {
                Assert.Inconclusive("No se encontraron usuarios para testear SearchRolesForUserService");
            }

            try
            {
                SearchRolesForUserRes res = svc.Execute(req);
            }
            catch (Exception ex)
            {
                strErrorResut = Fwk.Exceptions.ExceptionHelper.GetAllMessageException(ex);
            }


            Assert.AreEqual <String>(strErrorResut, string.Empty, strErrorResut);
        }
Exemplo n.º 2
0
        public void SearchRolesForUser_No_Service()
        {
            String strErrorResut = String.Empty;

            SearchRolesForUserService svc = new SearchRolesForUserService();
            SearchRolesForUserReq req = new SearchRolesForUserReq();

            List<User> userList = Fwk.Security.FwkMembership.GetAllUsers(null);
            if (userList.Count > 0)
            {
                req.BusinessData.Username = userList[0].UserName;
                
            }
            else
            {
                Assert.Inconclusive("No se encontraron usuarios para testear SearchRolesForUserService");
            }

            try
            {
                SearchRolesForUserRes res = svc.Execute(req);

            }
            catch (Exception ex)
            {
                strErrorResut = Fwk.Exceptions.ExceptionHelper.GetAllMessageException(ex);
            }


            Assert.AreEqual<String>(strErrorResut, string.Empty, strErrorResut);

        }