Search by postal code and house number - error cases
#language: en Feature: Search by postal code and house number - error cases Rule: Postcode and huisnummer are mandatory parameters @fout-case Scenario: The postcode and huisnummer parameters have not been supplied When persons are searched with the following parameters | naam | waarde | | type | ZoekMetPostcodeEnHuisnummer | | fields | burgerservicenummer | Then the response has an object with the following data | naam | waarde | | type | https://datatracker.ietf.org/doc/html/rfc7231#section-6.5.1 | | title | Een of meerdere parameters zijn niet correct. | | status | 400 | | detail | De foutieve parameter(s) zijn: postcode, huisnummer. | | code | paramsValidation | | instance | /haalcentraal/api/brp/personen | And the object has the following 'invalidParams' data | code | name | reason | | required | postcode | Parameter is verplicht. | | required | huisnummer | Parameter is verplicht. | @fout-case Scenario: The postcode parameter has not been supplied When persons are searched with the following parameters | naam | waarde | | type | ZoekMetPostcodeEnHuisnummer | | huisnummer | 2 | | fields | burgerservicenummer | Then the response has an object with the following data | naam | waarde | | type | https://datatracker.ietf.org/doc/html/rfc7231#section-6.5.1 | | title | Een of meerdere parameters zijn niet correct. | | status | 400 | | detail | De foutieve parameter(s) zijn: postcode. | | code | paramsValidation | | instance | /haalcentraal/api/brp/personen | And the object has the following 'invalidParams' data | code | name | reason | | required | postcode | Parameter is verplicht. | @fout-case Scenario: The huisnummer parameter has not been supplied When persons are searched with the following parameters | naam | waarde | | type | ZoekMetPostcodeEnHuisnummer | | postcode | 2628HJ | | fields | burgerservicenummer | Then the response has an object with the following data | naam | waarde | | type | https://datatracker.ietf.org/doc/html/rfc7231#section-6.5.1 | | title | Een of meerdere parameters zijn niet correct. | | status | 400 | | detail | De foutieve parameter(s) zijn: huisnummer. | | code | paramsValidation | | instance | /haalcentraal/api/brp/personen | And the object has the following 'invalidParams' data | code | name | reason | | required | huisnummer | Parameter is verplicht. | @fout-case Scenario: An empty string has been supplied as the postcode and huisnummer value When persons are searched with the following parameters | naam | waarde | | type | ZoekMetPostcodeEnHuisnummer | | postcode | | | huisnummer | | | fields | burgerservicenummer | Then the response has an object with the following data | naam | waarde | | type | https://datatracker.ietf.org/doc/html/rfc7231#section-6.5.1 | | title | Een of meerdere parameters zijn niet correct. | | status | 400 | | detail | De foutieve parameter(s) zijn: postcode, huisnummer. | | code | paramsValidation | | instance | /haalcentraal/api/brp/personen | And the object has the following 'invalidParams' data | code | name | reason | | required | postcode | Parameter is verplicht. | | required | huisnummer | Parameter is verplicht. | @fout-case Scenario Outline: <titel> When persons are searched with the following parameters | naam | waarde | | type | ZoekMetPostcodeEnHuisnummer | | postcode | <postcode> | | huisnummer | <huisnummer> | | fields | burgerservicenummer | Then the response has an object with the following data | naam | waarde | | type | https://datatracker.ietf.org/doc/html/rfc7231#section-6.5.1 | | title | Een of meerdere parameters zijn niet correct. | | status | 400 | | detail | De foutieve parameter(s) zijn: <foutieve parameter>. | | code | paramsValidation | | instance | /haalcentraal/api/brp/personen | And the object has the following 'invalidParams' data | code | name | reason | | required | <foutieve parameter> | Parameter is verplicht. | Examples: | titel | postcode | huisnummer | foutieve parameter | | Een lege string is opgegeven als huisnummer waarde | | 2 | postcode | | Een lege waarde is opgegeven als postcode waarde | 2628HJ | | huisnummer | Rule: a huisnummer is a number between 1 and 99999 @fout-case Scenario Outline: A string with one or more non-numeric characters has been supplied as the huisnummer value When persons are searched with the following parameters | naam | waarde | | type | ZoekMetPostcodeEnHuisnummer | | postcode | 2628HJ | | huisnummer | <huisnummer> | | fields | burgerservicenummer | Then the response has an object with the following data | naam | waarde | | type | https://datatracker.ietf.org/doc/html/rfc7231#section-6.5.1 | | title | Een of meerdere parameters zijn niet correct. | | status | 400 | | detail | De foutieve parameter(s) zijn: huisnummer. | | code | paramsValidation | | instance | /haalcentraal/api/brp/personen | And the object has the following 'invalidParams' data | code | name | reason | | integer | huisnummer | Waarde is geen geldig getal. | Examples: | huisnummer | | twee | | 2e | | <script>alert('hello world')</script> | @fout-case Scenario Outline: The huisnummer supplied does not fall between 1 and 99999 When persons are searched with the following parameters | naam | waarde | | type | ZoekMetPostcodeEnHuisnummer | | postcode | 2628HJ | | huisnummer | <huisnummer> | | fields | burgerservicenummer | Then the response has an object with the following data | naam | waarde | | type | https://datatracker.ietf.org/doc/html/rfc7231#section-6.5.1 | | title | Een of meerdere parameters zijn niet correct. | | status | 400 | | detail | De foutieve parameter(s) zijn: huisnummer. | | code | paramsValidation | | instance | /haalcentraal/api/brp/personen | And the object has the following 'invalidParams' data | code | name | reason | | <code> | huisnummer | <reason> | Examples: | huisnummer | code | reason | | 0 | minimum | Waarde is lager dan minimum 1. | | 100000 | maximum | Waarde is hoger dan maximum 99999. | Rule: a postal code is a string of 4 digits, 0 or 1 space and 2 letters (not case-sensitive) @fout-case Scenario Outline: An invalid postal code has been supplied When persons are searched with the following parameters | naam | waarde | | type | ZoekMetPostcodeEnHuisnummer | | postcode | <postcode> | | huisnummer | 2 | | fields | burgerservicenummer | Then the response has an object with the following data | naam | waarde | | type | https://datatracker.ietf.org/doc/html/rfc7231#section-6.5.1 | | title | Een of meerdere parameters zijn niet correct. | | status | 400 | | detail | De foutieve parameter(s) zijn: postcode. | | code | paramsValidation | | instance | /haalcentraal/api/brp/personen | And the object has the following 'invalidParams' data | code | name | reason | | pattern | postcode | Waarde voldoet niet aan patroon ^[1-9]{1}[0-9]{3}[ ]?[A-Za-z]{2}$. | Examples: | postcode | | 0628HJ | | 2628 HJ | | <script>alert('hello world');</script> | @fout-case Scenario: Several invalid parameters have been supplied When persons are searched with the following parameters | naam | waarde | | type | ZoekMetPostcodeEnHuisnummer | | postcode | 0628HJ | | huisnummer | twee | | fields | burgerservicenummer | Then the response has an object with the following data | naam | waarde | | type | https://datatracker.ietf.org/doc/html/rfc7231#section-6.5.1 | | title | Een of meerdere parameters zijn niet correct. | | status | 400 | | detail | De foutieve parameter(s) zijn: postcode, huisnummer. | | code | paramsValidation | | instance | /haalcentraal/api/brp/personen | And the object has the following 'invalidParams' data | code | name | reason | | pattern | postcode | Waarde voldoet niet aan patroon ^[1-9]{1}[0-9]{3}[ ]?[A-Za-z]{2}$. | | integer | huisnummer | Waarde is geen geldig getal. | Rule: a huisletter is a string of 1 letter (not case-sensitive) @fout-case Scenario Outline: An invalid value has been supplied for the 'huisletter' parameter When persons are searched with the following parameters | naam | waarde | | type | ZoekMetPostcodeEnHuisnummer | | postcode | 2628HJ | | huisnummer | 2 | | huisletter | <huisletter> | | fields | burgerservicenummer | Then the response has an object with the following data | naam | waarde | | type | https://datatracker.ietf.org/doc/html/rfc7231#section-6.5.1 | | title | Een of meerdere parameters zijn niet correct. | | status | 400 | | detail | De foutieve parameter(s) zijn: huisletter. | | code | paramsValidation | | instance | /haalcentraal/api/brp/personen | And the object has the following 'invalidParams' data | code | name | reason | | pattern | huisletter | Waarde voldoet niet aan patroon ^[a-zA-Z]{1}$. | Examples: | huisletter | | <script>alert('hello world');</script> | | 1 | Rule: A huisnummertoevoeging is a string of at least 1 and at most 4 characters. These characters may be: - lower-case letters (a-z) - upper-case letters (A-Z) - space ( ) and minus (-) @fout-case Scenario Outline: An invalid value has been supplied for the 'huisnummertoevoeging' parameter When persons are searched with the following parameters | naam | waarde | | type | ZoekMetPostcodeEnHuisnummer | | postcode | 2628HJ | | huisnummer | 2 | | huisnummertoevoeging | <huisnummertoevoeging> | | fields | burgerservicenummer | Then the response has an object with the following data | naam | waarde | | type | https://datatracker.ietf.org/doc/html/rfc7231#section-6.5.1 | | title | Een of meerdere parameters zijn niet correct. | | status | 400 | | detail | De foutieve parameter(s) zijn: huisnummertoevoeging. | | code | paramsValidation | | instance | /haalcentraal/api/brp/personen | And the object has the following 'invalidParams' data | code | name | reason | | pattern | huisnummertoevoeging | Waarde voldoet niet aan patroon ^[a-zA-Z0-9 \-]{1,4}$. | Examples: | huisnummertoevoeging | | <script>alert('hello world');</script> | | 123.45 | Rule: inclusiefOverledenPersonen is a boolean (a true or false value) @fout-case Scenario Outline: An invalid value has been supplied for the 'inclusiefOverledenPersonen' parameter When persons are searched with the following parameters | naam | waarde | | type | ZoekMetPostcodeEnHuisnummer | | postcode | 2628HJ | | huisnummer | 2 | | fields | burgerservicenummer | | inclusiefOverledenPersonen | <inclusief overleden personen> | Then the response has an object with the following data | naam | waarde | | type | https://datatracker.ietf.org/doc/html/rfc7231#section-6.5.1 | | title | Een of meerdere parameters zijn niet correct. | | status | 400 | | detail | De foutieve parameter(s) zijn: inclusiefOverledenPersonen. | | code | paramsValidation | | instance | /haalcentraal/api/brp/personen | And the object has the following 'invalidParams' data | code | name | reason | | boolean | inclusiefOverledenPersonen | Waarde is geen boolean. | Examples: | inclusief overleden personen | | | | geen boolean | Rule: Only the parameters specified for the search type supplied may be used @fout-case Scenario Outline: <titel> When persons are searched with the following parameters | naam | waarde | | type | ZoekMetPostcodeEnHuisnummer | | postcode | 2628HJ | | huisnummer | 2 | | <parameter> | <waarde> | | fields | burgerservicenummer | Then the response has an object with the following data | naam | waarde | | type | https://datatracker.ietf.org/doc/html/rfc7231#section-6.5.1 | | title | Een of meerdere parameters zijn niet correct. | | status | 400 | | detail | De foutieve parameter(s) zijn: <parameter>. | | code | paramsValidation | | instance | /haalcentraal/api/brp/personen | And the object has the following 'invalidParams' data | code | name | reason | | unknownParam | <parameter> | Parameter is niet verwacht. | Examples: | titel | parameter | waarde | | zoeken met parameter uit ander zoektype | voornamen | Pietje | | typfout in naam optionele parameter | huisleter | A | | zoeken met niet gespecificeerde parameter | bestaatNiet | een waarde |