public void ConvertNumber_Fail(string queryString) { var expectedFindExpression = "{}"; string actualFindExpression = SearchStringConverter.BuildFindExpressionFromQuery(queryString); Assert.Equal(expectedFindExpression, actualFindExpression); }
/// <summary> /// Searches for a set of objects that match the specified query syntax /// </summary> /// <param name="databaseName">Name of the database to use for this operation</param> /// <param name="collectionName">Name of the collection to use for this operation</param> /// <param name="searchExpression">The Google-like query syntax</param> /// <param name="findCriteria">The inputs for a find or search operation</param> /// <param name="headers">Optional custom headers to pass through to this request, such as for authorization tokens or correlation Ids</param> /// <returns>A collection of objects that match the search criteria</returns> public async Task <ServiceResult <SearchResults> > SearchAsync(string databaseName, string collectionName, string searchExpression, FindCriteria findCriteria, Dictionary <string, string> headers = null) { string convertedExpression = SearchStringConverter.BuildFindExpressionFromQuery(searchExpression); return(await FindAsync( databaseName : databaseName, collectionName : collectionName, findExpression : convertedExpression, findCriteria : findCriteria, headers : headers)); }
public void ConvertBoolean(string queryString, string expectedFindExpression) { string actualFindExpression = SearchStringConverter.BuildFindExpressionFromQuery(queryString); Assert.Equal(expectedFindExpression, actualFindExpression); }