Beispiel #1
0
        public void SearchOptionInvalidId(InvalidOptionId invalidId)
        {
            var prop = new Dictionary <string, object>(OptionSchemaProperty);

            SearchOptionInvalidIdMapper[invalidId](prop, SingleOption.Data.Id, DeletedOption.Data.Id);

            PerformTest(prop, false);
        }
Beispiel #2
0
        public void TestSearchOptionInvalidId(InvalidOptionId optionId)
        {
            OptionManager optionHandler            = new OptionManager();
            Dictionary <string, string> requestDic = new Dictionary <string, string>()
            {
                ["id"] = InvalidIdMapper[optionId],
            };
            var response = optionHandler.SearchOption(requestDic);

            PrAssert.That(response, PrIs.ErrorResponse().And.HttpCode(HttpStatusCode.BadRequest).And.ErrorCode((int)ResultCode.InvalidValue).Or.ErrorCode((int)ResultCode.ValueRangeExceeded), $"Still able to search option with id = {optionId.ToString()}");
        }