コード例 #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);
        }
コード例 #2
0
ファイル: RolesTest.cs プロジェクト: Pelsoft/fwk_10.3
        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);

        }