occupancy within a period with real dates
#language: en @gba Feature: occupancy within a period with real dates 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 | And address 'daaropvolgende' has the following data | gemeentecode (92.10) | identificatiecode verblijfplaats (11.80) | | 0800 | 0800010000000004 | Rule: the occupancy supplied is limited by the start date of the stay requested up to the start date of the next stay Scenario: first and only verblijfplaats 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 | 20210526 | When gba occupancy is searched with the following parameters | naam | waarde | | type | BewoningMetPeriode | | datumVan | 2021-01-01 | | datumTot | 2022-01-01 | | adresseerbaarObjectIdentificatie | 0800010000000002 | Then the response has an occupancy with the following data | naam | waarde | | periode | 2021-05-26 tot 2022-01-01 | | adresseerbaarObjectIdentificatie | 0800010000000002 | And the occupancy has an occupant with the following data | burgerservicenummer | | 000000012 | Scenario: next verblijfplaats 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 | 20210526 | And the person was subsequently registered at address 'volgende' with the following data | gemeente van inschrijving (09.10) | datum aanvang adreshouding (10.30) | | 0800 | 20211014 | When gba occupancy is searched with the following parameters | naam | waarde | | type | BewoningMetPeriode | | datumVan | 2021-01-01 | | datumTot | 2022-01-01 | | adresseerbaarObjectIdentificatie | 0800010000000002 | Then the response has an occupancy with the following data | naam | waarde | | periode | 2021-05-26 tot 2021-10-14 | | adresseerbaarObjectIdentificatie | 0800010000000002 | And the occupancy has an occupant with the following data | burgerservicenummer | | 000000012 | Scenario: the next verblijfplaats is a stay abroad 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 | 20210526 | And the 'verblijfplaats' has been changed to the following data | land (13.10) | datum aanvang adres buitenland (13.20) | regel 1 adres buitenland (13.30) | regel 2 adres buitenland (13.40) | regel 3 adres buitenland (13.50) | | 5010 | 20211014 | Rue du pomme 26 | Bruxelles | postcode 1000 | When gba occupancy is searched with the following parameters | naam | waarde | | type | BewoningMetPeriode | | datumVan | 2021-01-01 | | datumTot | 2022-01-01 | | adresseerbaarObjectIdentificatie | 0800010000000002 | Then the response has an occupancy with the following data | naam | waarde | | periode | 2021-05-26 tot 2021-10-14 | | adresseerbaarObjectIdentificatie | 0800010000000002 | And the occupancy has an occupant with the following data | burgerservicenummer | | 000000012 | Scenario: previous, next and subsequent verblijfplaats Given the person with citizen service number '000000012' is registered at address 'vorige' with the following data | gemeente van inschrijving (09.10) | datum aanvang adreshouding (10.30) | | 0800 | 20210516 | And the person was subsequently registered at address 'gevraagd' with the following data | gemeente van inschrijving (09.10) | datum aanvang adreshouding (10.30) | | 0800 | 20210526 | And the person was subsequently registered at address 'volgende' with the following data | gemeente van inschrijving (09.10) | datum aanvang adreshouding (10.30) | | 0800 | 20210730 | And the person was subsequently registered at address 'daaropvolgende' with the following data | gemeente van inschrijving (09.10) | datum aanvang adreshouding (10.30) | | 0800 | 20211014 | When gba occupancy is searched with the following parameters | naam | waarde | | type | BewoningMetPeriode | | datumVan | 2021-01-01 | | datumTot | 2022-01-01 | | adresseerbaarObjectIdentificatie | 0800010000000002 | Then the response has an occupancy with the following data | naam | waarde | | periode | 2021-05-26 tot 2021-07-30 | | adresseerbaarObjectIdentificatie | 0800010000000002 | And the occupancy has an occupant with the following data | burgerservicenummer | | 000000012 | Rule: the occupancy supplied is limited by the period requested Scenario Outline: <scenario> Given the person with citizen service number '000000012' is registered at address 'vorige' with the following data | gemeente van inschrijving (09.10) | datum aanvang adreshouding (10.30) | | 0800 | 20210516 | And the person was subsequently registered at address 'gevraagd' with the following data | gemeente van inschrijving (09.10) | datum aanvang adreshouding (10.30) | | 0800 | 20210526 | And the person was subsequently registered at address 'volgende' with the following data | gemeente van inschrijving (09.10) | datum aanvang adreshouding (10.30) | | 0800 | 20210730 | And the person was subsequently registered at address 'daaropvolgende' with the following data | gemeente van inschrijving (09.10) | datum aanvang adreshouding (10.30) | | 0800 | 20211014 | When gba occupancy is searched with the following parameters | naam | waarde | | type | BewoningMetPeriode | | datumVan | <datumVan> | | datumTot | <datumTot> | | adresseerbaarObjectIdentificatie | 0800010000000002 | Then the response has an occupancy with the following data | naam | waarde | | periode | <periode> | | adresseerbaarObjectIdentificatie | 0800010000000002 | And the occupancy has an occupant with the following data | burgerservicenummer | | 000000012 | Examples: | scenario | datumVan | datumTot | periode | | periode begint na datum aanvang | 2021-06-01 | 2022-01-01 | 2021-06-01 tot 2021-07-30 | | periode eindigt voor aanvang volgend verblijf | 2021-01-01 | 2021-07-01 | 2021-05-26 tot 2021-07-01 | | periode tussen aanvang en volgend verblijf | 2021-06-01 | 2021-07-01 | 2021-06-01 tot 2021-07-01 | Rule: a person is no longer an occupant from the date of suspension Scenario Outline: the person died during the stay at the address requested and <scenario> is requested Given the person with citizen service number '000000012' is registered at address 'vorige' with the following data | gemeente van inschrijving (09.10) | datum aanvang adreshouding (10.30) | | 0800 | 20210516 | And the person was subsequently registered at address 'gevraagd' with the following data | gemeente van inschrijving (09.10) | datum aanvang adreshouding (10.30) | | 0800 | 20210526 | And the person has the following 'inschrijving' data | datum opschorting bijhouding (67.10) | reden opschorting bijhouding (67.20) | | 20211127 | O | When gba occupancy is searched with the following parameters | naam | waarde | | type | BewoningMetPeriode | | datumVan | 2021-01-01 | | datumTot | <datumTot> | | adresseerbaarObjectIdentificatie | 0800010000000002 | Then the response has an occupancy with the following data | naam | waarde | | periode | 2021-05-26 tot <periode tot> | | adresseerbaarObjectIdentificatie | 0800010000000002 | And the occupancy has an occupant with the following data | burgerservicenummer | | 000000012 | Examples: | scenario | datumTot | periode tot | | periode eindigt voor overlijden | 2021-11-01 | 2021-11-01 | | periode gevraagd tot na overlijden | 2022-01-01 | 2021-11-27 | Scenario: the person died during the stay at the address requested and a period after the death is requested Given the person with citizen service number '000000012' is registered at address 'vorige' with the following data | gemeente van inschrijving (09.10) | datum aanvang adreshouding (10.30) | | 0800 | 20210516 | And the person was subsequently registered at address 'gevraagd' with the following data | gemeente van inschrijving (09.10) | datum aanvang adreshouding (10.30) | | 0800 | 20210526 | And the person has the following 'inschrijving' data | datum opschorting bijhouding (67.10) | reden opschorting bijhouding (67.20) | | 20211127 | O | When gba occupancy is searched with the following parameters | naam | waarde | | type | BewoningMetPeriode | | datumVan | 2021-12-01 | | datumTot | 2022-01-01 | | adresseerbaarObjectIdentificatie | 0800010000000002 | Then the response has 0 occupancies Scenario: the person died after leaving the address requested Given the person with citizen service number '000000012' is registered at address 'vorige' with the following data | gemeente van inschrijving (09.10) | datum aanvang adreshouding (10.30) | | 0800 | 20210516 | And the person was subsequently registered at address 'gevraagd' with the following data | gemeente van inschrijving (09.10) | datum aanvang adreshouding (10.30) | | 0800 | 20210526 | And the person was subsequently registered at address 'volgende' with the following data | gemeente van inschrijving (09.10) | datum aanvang adreshouding (10.30) | | 0800 | 20210730 | And the person was subsequently registered at address 'daaropvolgende' with the following data | gemeente van inschrijving (09.10) | datum aanvang adreshouding (10.30) | | 0800 | 20211014 | And the person has the following 'inschrijving' data | datum opschorting bijhouding (67.10) | reden opschorting bijhouding (67.20) | | 20211127 | O | When gba occupancy is searched with the following parameters | naam | waarde | | type | BewoningMetPeriode | | datumVan | 2021-01-01 | | datumTot | 2022-01-01 | | adresseerbaarObjectIdentificatie | 0800010000000002 | Then the response has an occupancy with the following data | naam | waarde | | periode | 2021-05-26 tot 2021-07-30 | | adresseerbaarObjectIdentificatie | 0800010000000002 | And the occupancy has an occupant with the following data | burgerservicenummer | | 000000012 | Rule: onjuist is ignored Scenario: the stay has been corrected, the person never lived here 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 | 20210516 | And the registration was subsequently corrected as a registration at address 'volgende' with the following data | gemeente van inschrijving (09.10) | datum aanvang adreshouding (10.30) | | 0800 | 20210526 | And the person was subsequently registered at address 'daaropvolgende' with the following data | gemeente van inschrijving (09.10) | datum aanvang adreshouding (10.30) | | 0800 | 20211014 | When gba occupancy is searched with the following parameters | naam | waarde | | type | BewoningMetPeriode | | datumVan | 2021-01-01 | | datumTot | 2022-01-01 | | adresseerbaarObjectIdentificatie | 0800010000000002 | Then the response has 0 occupancies Scenario Outline: <scenario> Given the person with citizen service number '000000012' is registered at address 'vorige' with the following data | gemeente van inschrijving (09.10) | datum aanvang adreshouding (10.30) | | 0800 | 20210516 | And the person was subsequently registered at address 'gevraagd' with the following data | gemeente van inschrijving (09.10) | datum aanvang adreshouding (10.30) | | 0800 | 20210526 | And the 'verblijfplaats' has been corrected to the following data | gemeente van inschrijving (09.10) | datum aanvang adreshouding (10.30) | functie adres (10.10) | | 0800 | <nieuwe datum> | W | And the person was subsequently registered at address 'volgende' with the following data | gemeente van inschrijving (09.10) | datum aanvang adreshouding (10.30) | | 0800 | 20210730 | And the person was subsequently registered at address 'daaropvolgende' with the following data | gemeente van inschrijving (09.10) | datum aanvang adreshouding (10.30) | | 0800 | 20211014 | When gba occupancy is searched with the following parameters | naam | waarde | | type | BewoningMetPeriode | | datumVan | 2021-01-01 | | datumTot | 2022-01-01 | | adresseerbaarObjectIdentificatie | 0800010000000002 | Then the response has an occupancy with the following data | naam | waarde | | periode | <periode> | | adresseerbaarObjectIdentificatie | 0800010000000002 | And the occupancy has an occupant with the following data | burgerservicenummer | | 000000012 | Examples: | scenario | nieuwe datum | periode | | datum aanvang is gecorrigeerd naar eerdere datum | 20210520 | 2021-05-20 tot 2021-07-30 | | datum aanvang is gecorrigeerd naar latere datum | 20210529 | 2021-05-29 tot 2021-07-30 | Scenario Outline: <scenario> Given the person with citizen service number '000000012' is registered at address 'vorige' with the following data | gemeente van inschrijving (09.10) | datum aanvang adreshouding (10.30) | | 0800 | 20210516 | And the person was subsequently registered at address 'gevraagd' with the following data | gemeente van inschrijving (09.10) | datum aanvang adreshouding (10.30) | | 0800 | 20210526 | And the person was subsequently registered at address 'volgende' with the following data | gemeente van inschrijving (09.10) | datum aanvang adreshouding (10.30) | | 0800 | 20210730 | And the 'verblijfplaats' has been corrected to the following data | gemeente van inschrijving (09.10) | datum aanvang adreshouding (10.30) | functie adres (10.10) | | 0800 | <nieuwe datum> | W | And the person was subsequently registered at address 'daaropvolgende' with the following data | gemeente van inschrijving (09.10) | datum aanvang adreshouding (10.30) | | 0800 | 20211014 | When gba occupancy is searched with the following parameters | naam | waarde | | type | BewoningMetPeriode | | datumVan | 2021-01-01 | | datumTot | 2022-01-01 | | adresseerbaarObjectIdentificatie | 0800010000000002 | Then the response has an occupancy with the following data | naam | waarde | | periode | <periode> | | adresseerbaarObjectIdentificatie | 0800010000000002 | And the occupancy has an occupant with the following data | burgerservicenummer | | 000000012 | Examples: | scenario | nieuwe datum | periode | | datum aanvang volgende is gecorrigeerd naar eerdere datum | 20210725 | 2021-05-26 tot 2021-07-25 | | datum aanvang volgende is gecorrigeerd naar latere datum | 20210803 | 2021-05-26 tot 2021-08-03 | Scenario Outline: the stay at the address requested is incorrect and <scenario> Given the person with citizen service number '000000012' is registered at address 'vorige' with the following data | gemeente van inschrijving (09.10) | datum aanvang adreshouding (10.30) | | 0800 | 20210516 | And the person was subsequently registered at address 'gevraagd' with the following data | gemeente van inschrijving (09.10) | datum aanvang adreshouding (10.30) | | 0800 | 20210526 | And the registration was subsequently corrected as a registration at address 'vorige' with the following data | gemeente van inschrijving (09.10) | datum aanvang adreshouding (10.30) | | 0800 | <nieuwe datum> | And the person was subsequently registered at address 'daaropvolgende' with the following data | gemeente van inschrijving (09.10) | datum aanvang adreshouding (10.30) | | 0800 | 20211014 | When gba occupancy is searched with the following parameters | naam | waarde | | type | BewoningMetPeriode | | datumVan | 2021-01-01 | | datumTot | 2022-01-01 | | adresseerbaarObjectIdentificatie | 0800010000000002 | Then the response has 0 occupancies Examples: | scenario | nieuwe datum | | gecorrigeerde verblijf begint op datum onjuiste verblijf | 20210526 | | gecorrigeerde verblijf begint op datum vorige | 20210516 | Scenario Outline: the next stay is incorrect Given the person with citizen service number '000000012' is registered at address 'vorige' with the following data | gemeente van inschrijving (09.10) | datum aanvang adreshouding (10.30) | | 0800 | 20210516 | And the person was subsequently registered at address 'gevraagd' with the following data | gemeente van inschrijving (09.10) | datum aanvang adreshouding (10.30) | | 0800 | 20210526 | And the person was subsequently registered at address 'volgende' with the following data | gemeente van inschrijving (09.10) | datum aanvang adreshouding (10.30) | | 0800 | 20210730 | And the registration was subsequently corrected as a registration at address 'gevraagd' with the following data | gemeente van inschrijving (09.10) | datum aanvang adreshouding (10.30) | | 0800 | <nieuwe datum> | And the person was subsequently registered at address 'daaropvolgende' with the following data | gemeente van inschrijving (09.10) | datum aanvang adreshouding (10.30) | | 0800 | 20211014 | When gba occupancy is searched with the following parameters | naam | waarde | | type | BewoningMetPeriode | | datumVan | 2021-01-01 | | datumTot | 2022-01-01 | | adresseerbaarObjectIdentificatie | 0800010000000002 | Then the response has an occupancy with the following data | naam | waarde | | periode | 2021-05-26 tot 2021-10-14 | | adresseerbaarObjectIdentificatie | 0800010000000002 | And the occupancy has an occupant with the following data | burgerservicenummer | | 000000012 | Examples: | scenario | nieuwe datum | | gecorrigeerde verblijf begint op datum onjuiste verblijf | 20210730 | | gecorrigeerde verblijf begint op datum gevraagde verblijf | 20210526 |