protected void ApprovalVerifySearchParser(Uri resourceRoot, string queryOption) { ODataUriParser parser = this.CreateSearchUriParser(resourceRoot, queryOption); var result = parser.ParseSearch(); ApprovalVerify(QueryNodeToStringVisitor.GetTestCaseAndResultString(result, queryOption)); }
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)); }
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)); }
public void SelectAll() { var selectString = "*"; ODataUriParser parser = this.CreateSelectUriParser(bossBase, selectString); var result = parser.ParseSelectAndExpand(); ApprovalVerify(QueryNodeToStringVisitor.GetTestCaseAndResultString(result, selectString, null)); }
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)); }
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); }
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); }