Esempio n. 1
0
        public void InvalidSearchBySystemUpdateDateField(ResourceId resource, SearchHelpers.InvalidTestCases testCase, string fieldName)
        {
            var request  = SearchRequestComposer.GetBuilderWithRestrictions(resource).DateFilter($"{resource.ToString()}.{fieldName}", OperatorType.Eq, Timezone, SearchHelpers.DateTimeMap[testCase].ToString());
            var handler  = new DefaultManager();
            var response = handler.Send <SearchResponse>(request);

            PrAssert.That(response, PrIs.ErrorResponse());
        }
        public void InvalidSearchByCustomDateField(ResourceId resource, FieldType fieldType, string fieldName, Func <string> fieldNameProvider, SearchHelpers.InvalidTestCases testCase)
        {
            var request  = SearchRequestComposer.GetBuilderWithRestrictions(resource).DateFilter(fieldNameProvider(), OperatorType.Eq, Timezone, SearchHelpers.DateTimeMap[testCase].ToString());
            var handler  = new DefaultManager();
            var response = handler.Send <SearchResponse>(request);

            PrAssert.That(response, PrIs.ErrorResponse());
        }