public void Search_SimpleTwoOrExpressions_Ok() { var expression1 = Search.CreateSearchParameter("inStock", "true").Or(Search.CreateSearchParameter("id", "1234")); var expression2 = Search.CreateSearchParameter("productName", "Monitor").Or(Search.CreateSearchParameter("brand", "dell")); var resultExpression = expression1.And(expression2); var countVisitor = new CountVisitor(); countVisitor.CountParameters(resultExpression); }
public void Query_Simple_Ok() { var expression = Search.CreateSearchParameter("inStock", "true").And(Search.CreateSearchParameter("id", "1234")); expression.Or(Search.CreateSearchParameter("id", "5678")).Or(Search.CreateSearchParameter("name", "adata")); var qb = new QueryBuilder("", ""); qb.Search(expression); var countVisitor = new CountVisitor(); countVisitor.CountParameters(qb.SearchParameterTree); qb.ToString(); }