public SearchAllRulesRes SearchAllRules() { String strErrorResut = String.Empty; SearchAllRulesReq req = new SearchAllRulesReq(); SearchAllRulesRes res = new SearchAllRulesRes(); SearchAllRulesService svc = new SearchAllRulesService(); req.SecurityProviderName = SecurityProviderName; try { res = svc.Execute(req); } catch (Exception ex) { strErrorResut = Fwk.Exceptions.ExceptionHelper.GetAllMessageException(ex); } Assert.AreEqual <String>(strErrorResut, string.Empty, strErrorResut); return(res); }
/// <summary> /// /// </summary> /// <returns></returns> public static FwkAuthorizationRuleList SearchAllRules() { SearchAllRulesReq req = new SearchAllRulesReq(); req.CacheSettings.CacheOnClientSide = false; SearchAllRulesRes res = req.ExecuteService <SearchAllRulesReq, SearchAllRulesRes>(WrapperSecurityProvider, req); if (res.Error != null) { throw Fwk.Exceptions.ExceptionHelper.ProcessException(res.Error); } return(res.BusinessData); }
public void Rules_CRUD_No_Service() { base.Tx = new TransactionScopeHandler(TransactionalBehaviour.RequiresNew, IsolationLevel.ReadCommitted, new TimeSpan(0, 1, 15)); base.Tx.InitScope(); CreateRule_No_Service(); SearchAllRulesRes res = SearchAllRules(); bool updateOK = res.BusinessData.Any <FwkAuthorizationRule>(r => r.Name.Equals("rule_1", StringComparison.OrdinalIgnoreCase)); UpdateRules_No_Service(); res = SearchAllRules(); updateOK = res.BusinessData.Any <FwkAuthorizationRule>(r => r.Name.Equals("rule_1", StringComparison.OrdinalIgnoreCase) && r.Expression.Equals("(R:Admin OR R:User)", StringComparison.OrdinalIgnoreCase)); Assert.AreEqual <bool>(updateOK, true, "No se actualizo correctamente la regla"); base.Tx.Abort(); }
public void SearchAllRulesService_No_Service() { String strErrorResut = String.Empty; SearchAllRulesReq req = new SearchAllRulesReq(); SearchAllRulesRes res = new SearchAllRulesRes(); SearchAllRulesService svc = new SearchAllRulesService(); //res.ContextInformation.CompanyId = "pelsoft"; //req.SecurityProviderName = "tesa"; req.SecurityProviderName = SecurityProviderName; try { res = svc.Execute(req); } catch (Exception ex) { strErrorResut = Fwk.Exceptions.ExceptionHelper.GetAllMessageException(ex); } Assert.AreEqual <String>(strErrorResut, string.Empty, strErrorResut); }
public SearchAllRulesRes SearchAllRules() { String strErrorResut = String.Empty; SearchAllRulesReq req = new SearchAllRulesReq(); SearchAllRulesRes res = new SearchAllRulesRes(); SearchAllRulesService svc = new SearchAllRulesService(); req.SecurityProviderName = SecurityProviderName; try { res = svc.Execute(req); } catch (Exception ex) { strErrorResut = Fwk.Exceptions.ExceptionHelper.GetAllMessageException(ex); } Assert.AreEqual<String>(strErrorResut, string.Empty, strErrorResut); return res; }
public void SearchAllRulesService_No_Service() { String strErrorResut = String.Empty; SearchAllRulesReq req = new SearchAllRulesReq(); SearchAllRulesRes res = new SearchAllRulesRes(); SearchAllRulesService svc = new SearchAllRulesService(); //res.ContextInformation.CompanyId = "pelsoft"; //req.SecurityProviderName = "tesa"; req.SecurityProviderName = SecurityProviderName; try { res = svc.Execute(req); } catch (Exception ex) { strErrorResut = Fwk.Exceptions.ExceptionHelper.GetAllMessageException(ex); } Assert.AreEqual<String>(strErrorResut, string.Empty, strErrorResut); }