Exemplo n.º 1
0
        public void SelectAll()
        {
            var            selectString = "*";
            ODataUriParser parser       = this.CreateSelectUriParser(peopleBase, selectString);
            var            result       = parser.ParseSelectAndExpand();

            ApprovalVerify(QueryNodeToStringVisitor.GetTestCaseAndResultString(result, selectString, null));
        }
Exemplo n.º 2
0
        public void SelectFunction()
        {
            var            selectString = "Microsoft.Test.Taupo.OData.WCFService.GetOrderRate";
            ODataUriParser parser       = this.CreateSelectUriParser(orderBase, selectString);
            var            result       = parser.ParseSelectAndExpand();

            ApprovalVerify(QueryNodeToStringVisitor.GetTestCaseAndResultString(result, selectString, null));
        }
Exemplo n.º 3
0
        public void RedundantlyParserFilter()
        {
            const string   queryOption = "AssociatedOrder($filter=CustomerID eq null)";
            ODataUriParser parser      = this.CreateExpandUriParser(orderDetailBase, queryOption);
            var            result      = parser.ParseSelectAndExpand();

            ApprovalVerify(QueryNodeToStringVisitor.GetTestCaseAndResultString(result, null, queryOption));
            result = parser.ParseSelectAndExpand();
            ApprovalVerify(QueryNodeToStringVisitor.GetTestCaseAndResultString(result, null, queryOption));
        }
Exemplo n.º 4
0
 private void TestAllInOneExtensionFilter(Uri baseUri, string filter, string origFilter)
 {
     this.TestExtension(
         this.CreateFilterUriParser(baseUri, filter),
         new AllInOneResolver()
     {
         EnableCaseInsensitive = true
     },
         parser => parser.ParseFilter(),
         clause => QueryNodeToStringVisitor.GetTestCaseAndResultString(clause, origFilter),
         this.ApprovalVerify);
 }
Exemplo n.º 5
0
 private void TestAllInOneExtensionOrderBy(Uri baseUri, string orderby, string origOrderby)
 {
     this.TestExtension(
         this.CreateOrderByUriParser(baseUri, orderby),
         new AllInOneResolver()
     {
         EnableCaseInsensitive = true
     },
         parser => parser.ParseOrderBy(),
         clause => QueryNodeToStringVisitor.GetTestCaseAndResultString(clause, origOrderby),
         this.ApprovalVerify);
 }
Exemplo n.º 6
0
        public void RedundantlyParserFilter()
        {
            const string   queryOption = "CustomerID eq null";
            ODataUriParser parser      = this.CreateFilterUriParser(orderBase, queryOption);
            var            result      = parser.ParseFilter();

            ApprovalVerify(QueryNodeToStringVisitor.GetTestCaseAndResultString(result, queryOption));
            result = parser.ParseFilter();
            ApprovalVerify(QueryNodeToStringVisitor.GetTestCaseAndResultString(result, queryOption));

            this.TestAllInOneExtensionFilter(
                orderBase,
                "customerid eQ null",
                "CustomerID eq null");
        }