public void PerformSearchWithExcessiveParametersTest_ForSublistSearch(string parameterPath, bool allSame) { var request = SearchRequestComposer.GetBuilderWithRestrictions(ResourceId.Client, limit: 10, offset: 0) .SubqueryFilter("Client.P_Id", ResourceId.Job, "Job.P_Id", SearchFilter.CreateNum("Job.P_Id", ">", 0)); var requestString = GetRequestStringWithExcessiveParameters(request, parameterPath, allSame ? null : "10010"); var connection = PrivateApiConnection.GetConnectionForCurrentTest(); using (var response = connection.SendAsync(SearchManager.EndPoint, requestString, System.Net.Http.HttpMethod.Post).Result) { PrAssert.That(!response.IsSuccessStatusCode, "A request with an extra parameter was successful while expected fail"); } }
public SearchRequest NumFilter(string fieldName, OperatorType op, object value) { _request.Conditions.Filter = SearchFilter.CreateNum(fieldName, OperatorTypeMap[op], value); return(_request); }