HAALCENTRAAL English translation
BRP API / Bewoning / Features / briefadres-gba

determining the start and end date for a correspondence address for occupancy within a period

#language: en

@gba
Feature: determining the start and end date for a correspondence address for occupancy within a period

    Background:
      Given address 'vorige' has the following data
      | gemeentecode (92.10) | identificatiecode verblijfplaats (11.80) |
      | 0800                 | 0800010000000001                         |
      And address 'gevraagd' has the following data
      | gemeentecode (92.10) | identificatiecode verblijfplaats (11.80) |
      | 0800                 | 0800010000000002                         |
      And address 'volgende' has the following data
      | gemeentecode (92.10) | identificatiecode verblijfplaats (11.80) |
      | 0800                 | 0800010000000003                         |


    Scenario: verblijfplaats with a partly unknown start date and the previous verblijfplaats is a correspondence address
      Given the person with citizen service number '000000012' has given address 'vorige' as a correspondence address with the following data
      | gemeente van inschrijving (09.10) | datum aanvang adreshouding (10.30) |
      | 0800                              | 20220526                           |
      And the person was subsequently registered at address 'gevraagd' with the following data
      | gemeente van inschrijving (09.10) | datum aanvang adreshouding (10.30) |
      | 0800                              | 20220000                           |
      When gba occupancy is searched with the following parameters
      | naam                             | waarde             |
      | type                             | BewoningMetPeriode |
      | datumVan                         | 2022-01-01         |
      | datumTot                         | 2024-01-01         |
      | adresseerbaarObjectIdentificatie | 0800010000000002   |
      Then the response has an occupancy with the following data
      | naam                             | waarde                    |
      | periode                          | 2022-05-27 tot 2023-01-01 |
      | adresseerbaarObjectIdentificatie | 0800010000000002          |
      And the occupancy has a possible occupant with the following data
      | burgerservicenummer |
      | 000000012           |
      And the response has an occupancy with the following data
      | naam                             | waarde                    |
      | periode                          | 2023-01-01 tot 2024-01-01 |
      | adresseerbaarObjectIdentificatie | 0800010000000002          |
      And the occupancy has an occupant with the following data
      | burgerservicenummer |
      | 000000012           |

    Scenario: the next verblijfplaats is a correspondence address
      Given the person with citizen service number '000000012' is registered at address 'gevraagd' with the following data
      | gemeente van inschrijving (09.10) | datum aanvang adreshouding (10.30) |
      | 0800                              | 20160526                           |
      And the person has subsequently given address 'volgende' as a correspondence address with the following data
      | gemeente van inschrijving (09.10) | datum aanvang adreshouding (10.30) |
      | 0800                              | 20220810                           |
      When gba occupancy is searched with the following parameters
      | naam                             | waarde             |
      | type                             | BewoningMetPeriode |
      | datumVan                         | 2022-01-01         |
      | datumTot                         | 2023-01-01         |
      | adresseerbaarObjectIdentificatie | 0800010000000002   |
      Then the response has an occupancy with the following data
      | naam                             | waarde                    |
      | periode                          | 2022-01-01 tot 2022-08-10 |
      | adresseerbaarObjectIdentificatie | 0800010000000002          |
      And the occupancy has an occupant with the following data
      | burgerservicenummer |
      | 000000012           |

    Scenario: the verblijfplaats changes from a residential address to a correspondence address
      Given the person with citizen service number '000000012' is registered at address 'gevraagd' with the following data
      | gemeente van inschrijving (09.10) | datum aanvang adreshouding (10.30) |
      | 0800                              | 20160526                           |
      And the person has subsequently given address 'gevraagd' as a correspondence address with the following data
      | gemeente van inschrijving (09.10) | datum aanvang adreshouding (10.30) |
      | 0800                              | 20220810                           |
      When gba occupancy is searched with the following parameters
      | naam                             | waarde             |
      | type                             | BewoningMetPeriode |
      | datumVan                         | 2022-01-01         |
      | datumTot                         | 2023-01-01         |
      | adresseerbaarObjectIdentificatie | 0800010000000002   |
      Then the response has an occupancy with the following data
      | naam                             | waarde                    |
      | periode                          | 2022-01-01 tot 2022-08-10 |
      | adresseerbaarObjectIdentificatie | 0800010000000002          |
      And the occupancy has an occupant with the following data
      | burgerservicenummer |
      | 000000012           |

    Scenario: the next verblijfplaats with a partly unknown start date is a correspondence address
      Given the person with citizen service number '000000012' is registered at address 'gevraagd' with the following data
      | gemeente van inschrijving (09.10) | datum aanvang adreshouding (10.30) |
      | 0800                              | 20160526                           |
      And the person has subsequently given address 'volgende' as a correspondence address with the following data
      | gemeente van inschrijving (09.10) | datum aanvang adreshouding (10.30) |
      | 0800                              | 20220800                           |
      When gba occupancy is searched with the following parameters
      | naam                             | waarde             |
      | type                             | BewoningMetPeriode |
      | datumVan                         | 2022-01-01         |
      | datumTot                         | 2023-01-01         |
      | adresseerbaarObjectIdentificatie | 0800010000000002   |
      Then the response has an occupancy with the following data
      | naam                             | waarde                    |
      | periode                          | 2022-01-01 tot 2022-08-01 |
      | adresseerbaarObjectIdentificatie | 0800010000000002          |
      And the occupancy has an occupant with the following data
      | burgerservicenummer |
      | 000000012           |
      And the response has an occupancy with the following data
      | naam                             | waarde                    |
      | periode                          | 2022-08-01 tot 2022-09-01 |
      | adresseerbaarObjectIdentificatie | 0800010000000002          |
      And the occupancy has a possible occupant with the following data
      | burgerservicenummer |
      | 000000012           |