Ejemplo n.º 1
0
        protected void ApprovalVerifySearchParser(Uri resourceRoot, string queryOption)
        {
            ODataUriParser parser = this.CreateSearchUriParser(resourceRoot, queryOption);
            var            result = parser.ParseSearch();

            ApprovalVerify(QueryNodeToStringVisitor.GetTestCaseAndResultString(result, queryOption));
        }
Ejemplo n.º 2
0
        protected void ApprovalVerifyOrderByParser(Uri resourceRoot, string queryOption, IEdmModel model = null)
        {
            ODataUriParser parser = this.CreateOrderByUriParser(resourceRoot, queryOption, model);
            var            result = parser.ParseOrderBy();

            ApprovalVerify(QueryNodeToStringVisitor.GetTestCaseAndResultString(result, queryOption));
        }
Ejemplo n.º 3
0
        protected void ApprovalVerifySelectAndExpandParser(Uri resourceRoot, string selectQueryOption, string expandQueryOption)
        {
            ODataUriParser parser = this.CreateSelectAndExpandUriParser(resourceRoot, selectQueryOption, expandQueryOption);
            var            result = parser.ParseSelectAndExpand();

            ApprovalVerify(QueryNodeToStringVisitor.GetTestCaseAndResultString(result, selectQueryOption, expandQueryOption));
        }
Ejemplo n.º 4
0
        public void SelectAll()
        {
            var            selectString = "*";
            ODataUriParser parser       = this.CreateSelectUriParser(bossBase, selectString);
            var            result       = parser.ParseSelectAndExpand();

            ApprovalVerify(QueryNodeToStringVisitor.GetTestCaseAndResultString(result, selectString, null));
        }
Ejemplo n.º 5
0
        public void SelectAction()
        {
            var            selectString = "Microsoft.Test.Taupo.OData.WCFService.GetBrothers";
            ODataUriParser parser       = this.CreateSelectUriParser(bossBase, selectString);
            var            result       = parser.ParseSelectAndExpand();

            ApprovalVerify(QueryNodeToStringVisitor.GetTestCaseAndResultString(result, selectString, null));
        }
Ejemplo n.º 6
0
 protected void TestAllInOneExtensionFilter(Uri baseUri, string filter, string origFilter, IEdmModel model = null)
 {
     this.TestExtension(
         this.CreateFilterUriParser(baseUri, filter, model),
         new AllInOneResolver()
     {
         EnableCaseInsensitive = true
     },
         parser => parser.ParseFilter(),
         clause => QueryNodeToStringVisitor.GetTestCaseAndResultString(clause, origFilter),
         this.ApprovalVerify);
 }
Ejemplo n.º 7
0
 protected void TestAllInOneExtensionSelectExpand(Uri baseUri, string select, string expand, string origSelect, string origExpand, IEdmModel model = null)
 {
     this.TestExtension(
         this.CreateSelectAndExpandUriParser(baseUri, select, expand, model),
         new AllInOneResolver()
     {
         EnableCaseInsensitive = true
     },
         parser => parser.ParseSelectAndExpand(),
         clause => QueryNodeToStringVisitor.GetTestCaseAndResultString(clause, origSelect, origExpand),
         this.ApprovalVerify);
 }