예제 #1
0
        public void SelectAll()
        {
            var            selectString = "*";
            ODataUriParser parser       = this.CreateSelectUriParser(peopleBase, selectString);
            var            result       = parser.ParseSelectAndExpand();

            ApprovalVerify(QueryNodeToStringVisitor.GetTestCaseAndResultString(result, selectString, null));
        }
예제 #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));
        }
예제 #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));
        }
예제 #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);
 }
예제 #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);
 }
예제 #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");
        }