consult occupancy on a reference date - error cases
#language: en @gba Feature: consult occupancy on a reference date - error cases Rule: The adresseerbaarObjectIdentificatie and peildatum parameters are mandatory parameters @fout-case Scenario: The adresseerbaarObjectIdentificatie and peildatum parameters have not been supplied When gba occupancy is searched with the following parameters | naam | waarde | | type | BewoningMetPeildatum | 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: adresseerbaarObjectIdentificatie, peildatum. | | code | paramsValidation | | instance | /haalcentraal/api/bewoning/bewoningen | And the object has the following 'invalidParams' data | code | name | reason | | required | adresseerbaarObjectIdentificatie | Parameter is verplicht. | | required | peildatum | Parameter is verplicht. | @fout-case Scenario: The adresseerbaarObjectIdentificatie parameter has not been supplied When gba occupancy is searched with the following parameters | naam | waarde | | type | BewoningMetPeildatum | | peildatum | 2023-01-01 | 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: adresseerbaarObjectIdentificatie. | | code | paramsValidation | | instance | /haalcentraal/api/bewoning/bewoningen | And the object has the following 'invalidParams' data | code | name | reason | | required | adresseerbaarObjectIdentificatie | Parameter is verplicht. | @fout-case Scenario: The peildatum parameter has not been supplied When gba occupancy is searched with the following parameters | naam | waarde | | type | BewoningMetPeildatum | | adresseerbaarObjectIdentificatie | 0800010000000001 | 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: peildatum. | | code | paramsValidation | | instance | /haalcentraal/api/bewoning/bewoningen | And the object has the following 'invalidParams' data | code | name | reason | | required | peildatum | Parameter is verplicht. | @fout-case Scenario: an empty string has been supplied as the adresseerbaarObjectIdentificatie value When gba occupancy is searched with the following parameters | naam | waarde | | type | BewoningMetPeildatum | | peildatum | 2023-01-01 | | adresseerbaarObjectIdentificatie | | 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: adresseerbaarObjectIdentificatie. | | code | paramsValidation | | instance | /haalcentraal/api/bewoning/bewoningen | And the object has the following 'invalidParams' data | code | name | reason | | required | adresseerbaarObjectIdentificatie | Parameter is verplicht. | @fout-case Scenario: an empty string has been supplied as the peildatum value When gba occupancy is searched with the following parameters | naam | waarde | | type | BewoningMetPeildatum | | peildatum | | | adresseerbaarObjectIdentificatie | 0800010000000001 | 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: peildatum. | | code | paramsValidation | | instance | /haalcentraal/api/bewoning/bewoningen | And the object has the following 'invalidParams' data | code | name | reason | | required | peildatum | Parameter is verplicht. | Rule: A valid adresseerbaarObjectIdentificatie is a string of exactly 16 digits, 16 zeros not included @fout-case Scenario Outline: <omschrijving> When gba occupancy is searched with the following parameters | naam | waarde | | type | BewoningMetPeildatum | | peildatum | 2023-01-01 | | adresseerbaarObjectIdentificatie | <adresseerbaarObjectIdentificatie> | 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: adresseerbaarObjectIdentificatie. | | code | paramsValidation | | instance | /haalcentraal/api/bewoning/bewoningen | And the object has the following 'invalidParams' data | code | name | reason | | pattern | adresseerbaarObjectIdentificatie | Waarde voldoet niet aan patroon ^(?!0{16})[0-9]{16}$. | Examples: | adresseerbaarObjectIdentificatie | omschrijving | | 123456789012345 | de opgegeven adresseerbaarObjectIdentificatie is een string met minder dan 16 cijfers | | 12345678901234567 | de opgegeven adresseerbaarObjectIdentificatie is een string met meer dan 16 cijfers | | <script>1234567890123456</script> | de opgegeven adresseerbaarObjectIdentificatie bevat niet-cijfer karakters | | 0000000000000000 | de opgegeven adresseerbaarObjectIdentificatie is een string bestaande uit 16 nullen | Rule: The peildatum is a date string formatted according to the [ISO 8601 date format](https://www.w3.org/QA/Tips/iso-date) @fout-case Scenario Outline: an invalid date has been supplied as the peildatum value When gba occupancy is searched with the following parameters | naam | waarde | | type | BewoningMetPeildatum | | peildatum | <peildatum> | | adresseerbaarObjectIdentificatie | 0800010000000001 | 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: peildatum. | | code | paramsValidation | | instance | /haalcentraal/api/bewoning/bewoningen | And the object has the following 'invalidParams' data | code | name | reason | | date | peildatum | Waarde is geen geldige datum. | Examples: | peildatum | | 19830526 | | 26 mei 1983 | | 2023-02-29 | Rule: Only the parameters specified for the consult type supplied may be used @fout-case Scenario Outline: <omschrijving> When gba occupancy is searched with the following parameters | naam | waarde | | type | BewoningMetPeildatum | | peildatum | 2023-01-01 | | adresseerbaarObjectIdentificatie | 0800010000000001 | | <parameter> | <waarde> | 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/bewoning/bewoningen | And the object has the following 'invalidParams' data | code | name | reason | | unknownParam | <parameter> | Parameter is niet verwacht. | Examples: | omschrijving | parameter | waarde | | raadplegen met parameter uit ander raadpleeg type | periode | 2022-01-01 tot 2023-01-01 | | raadplegen met niet gespecificeerde parameter | geheimhouding | false |