Exemple #1
0
        //[TestMethod]
        public void UpdateRulesCategory_No_Service(int id)
        {
            String strErrorResut           = String.Empty;
            UpdateRulesCategoryService svc = new UpdateRulesCategoryService();
            UpdateRulesCategoryReq     req = new UpdateRulesCategoryReq();
            UpdateRulesCategoryRes     res = new UpdateRulesCategoryRes();

            req.BusinessData.CategoryId             = id;
            req.BusinessData.Name                   = "CategoryXtest_1";
            req.BusinessData.ParentId               = 0;
            req.BusinessData.FwkRulesInCategoryList = new FwkAuthorizationRuleList();
            req.BusinessData.FwkRulesInCategoryList.Add(new FwkAuthorizationRule("Rule_1", ""));
            req.BusinessData.FwkRulesInCategoryList.Add(new FwkAuthorizationRule("Rule_3", ""));
            req.BusinessData.FwkRulesInCategoryList.Add(new FwkAuthorizationRule("Rule_4", ""));
            req.SecurityProviderName = SecurityProviderName;

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


            Assert.AreEqual <String>(strErrorResut, string.Empty, strErrorResut);
        }
Exemple #2
0
        //[TestMethod]
        public void UpdateRulesCategory_No_Service(int id)
        {
     
        
            String strErrorResut = String.Empty;
            UpdateRulesCategoryService svc = new UpdateRulesCategoryService();
            UpdateRulesCategoryReq req = new UpdateRulesCategoryReq();
            UpdateRulesCategoryRes res = new UpdateRulesCategoryRes();

            req.BusinessData.CategoryId = id;
            req.BusinessData.Name = "CategoryXtest_1";
            req.BusinessData.ParentId = 0;
            req.BusinessData.FwkRulesInCategoryList = new FwkAuthorizationRuleList();
            req.BusinessData.FwkRulesInCategoryList.Add(new FwkAuthorizationRule("Rule_1", ""));
            req.BusinessData.FwkRulesInCategoryList.Add(new FwkAuthorizationRule("Rule_3", ""));
            req.BusinessData.FwkRulesInCategoryList.Add(new FwkAuthorizationRule("Rule_4", ""));
            req.SecurityProviderName = SecurityProviderName;

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


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


        }