Step definitions for specifying authority relationships
# language: en @integratie @stap-documentatie Feature: Step definitions for specifying authority relationships Rule: Marriage and registered partnership are added as persoon_type 'R' for both persons involved # To Do: which data of a person is included - because it is relevant - in the relationship? # date of birth, country of birth, etc.? @integratie Scenario: '{naam1}' and '{naam2}' are married to each other Given the person 'P1' with citizen service number '000000012' And the person 'P2' with citizen service number '000000024' And 'P1' and 'P2' are married to each other When the SQL statements generated from the Given steps have been executed Then person 'P1' has the following row in table 'lo3_pl' | pl_id | geheim_ind | | P1 | 0 | And person 'P1' has the following rows in table 'lo3_pl_persoon' | pl_id | persoon_type | stapel_nr | volg_nr | burger_service_nr | geslachts_naam | geboorte_land_code | akte_nr | relatie_start_datum | relatie_start_plaats | relatie_start_land_code | verbintenis_soort | | P1 | P | 0 | 0 | 000000012 | P1 | 6030 | 1AA0100 | | | | | | P1 | R | 0 | 0 | 000000024 | P2 | | | gisteren - 20 jaar | 0518 | 6030 | H | And person 'P2' has the following row in table 'lo3_pl' | pl_id | geheim_ind | | P2 | 0 | And person 'P2' has the following rows in table 'lo3_pl_persoon' | pl_id | persoon_type | stapel_nr | volg_nr | burger_service_nr | geslachts_naam | geboorte_land_code | akte_nr | relatie_start_datum | relatie_start_plaats | relatie_start_land_code | verbintenis_soort | | P2 | P | 0 | 0 | 000000024 | P2 | 6030 | 1AA0100 | | | | | | P2 | R | 0 | 0 | 000000012 | P1 | | | gisteren - 20 jaar | 0518 | 6030 | H | @integratie Scenario Outline: '{naam1}' and '{naam2}' married {relatievedatum} Given the person 'P1' with citizen service number '000000012' And the person 'P2' with citizen service number '000000024' And 'P1' and 'P2' married <relatieve datum> When the SQL statements generated from the Given steps have been executed Then person 'P1' has the following row in table 'lo3_pl' | pl_id | geheim_ind | | P1 | 0 | And person 'P1' has the following rows in table 'lo3_pl_persoon' | pl_id | persoon_type | stapel_nr | volg_nr | burger_service_nr | geslachts_naam | geboorte_land_code | akte_nr | relatie_start_datum | relatie_start_plaats | relatie_start_land_code | verbintenis_soort | | P1 | P | 0 | 0 | 000000012 | P1 | 6030 | 1AA0100 | | | | | | P1 | R | 0 | 0 | 000000024 | P2 | | | <relatieve datum> | 0518 | 6030 | H | And person 'P2' has the following row in table 'lo3_pl' | pl_id | geheim_ind | | P2 | 0 | And person 'P2' has the following rows in table 'lo3_pl_persoon' | pl_id | persoon_type | stapel_nr | volg_nr | burger_service_nr | geslachts_naam | geboorte_land_code | akte_nr | relatie_start_datum | relatie_start_plaats | relatie_start_land_code | verbintenis_soort | | P2 | P | 0 | 0 | 000000024 | P2 | 6030 | 1AA0100 | | | | | | P2 | R | 0 | 0 | 000000012 | P1 | | | <relatieve datum> | 0518 | 6030 | H | Examples: | relatieve datum | | 2 jaar geleden | | gisteren - 5 jaar | @integratie Scenario: '{naam1}' and '{naam2}' entered into a registered partnership on {datum} Given the person 'P1' with citizen service number '000000012' And the person 'P2' with citizen service number '000000024' And 'P1' and 'P2' entered into a registered partnership on 1-3-2010 When the SQL statements generated from the Given steps have been executed Then person 'P1' has the following row in table 'lo3_pl' | pl_id | geheim_ind | | P1 | 0 | And person 'P1' has the following rows in table 'lo3_pl_persoon' | pl_id | persoon_type | stapel_nr | volg_nr | burger_service_nr | geslachts_naam | geboorte_land_code | akte_nr | relatie_start_datum | relatie_start_plaats | relatie_start_land_code | verbintenis_soort | | P1 | P | 0 | 0 | 000000012 | P1 | 6030 | 1AA0100 | | | | | | P1 | R | 0 | 0 | 000000024 | P2 | | | 20100301 | 0518 | 6030 | P | And person 'P2' has the following row in table 'lo3_pl' | pl_id | geheim_ind | | P2 | 0 | And person 'P2' has the following rows in table 'lo3_pl_persoon' | pl_id | persoon_type | stapel_nr | volg_nr | burger_service_nr | geslachts_naam | geboorte_land_code | akte_nr | relatie_start_datum | relatie_start_plaats | relatie_start_land_code | verbintenis_soort | | P2 | P | 0 | 0 | 000000024 | P2 | 6030 | 1AA0100 | | | | | | P2 | R | 0 | 0 | 000000012 | P1 | | | 20100301 | 0518 | 6030 | P | @integratie Scenario: '{naam1}' and '{naam2}' entered into a registered partnership {relatieve datum} Given the person 'P1' with citizen service number '000000012' And the person 'P2' with citizen service number '000000024' And 'P1' and 'P2' entered into a registered partnership 7 years ago When the SQL statements generated from the Given steps have been executed Then person 'P1' has the following row in table 'lo3_pl' | pl_id | geheim_ind | | P1 | 0 | And person 'P1' has the following rows in table 'lo3_pl_persoon' | pl_id | persoon_type | stapel_nr | volg_nr | burger_service_nr | geslachts_naam | geboorte_land_code | akte_nr | relatie_start_datum | relatie_start_plaats | relatie_start_land_code | verbintenis_soort | | P1 | P | 0 | 0 | 000000012 | P1 | 6030 | 1AA0100 | | | | | | P1 | R | 0 | 0 | 000000024 | P2 | | | 7 jaar geleden | 0518 | 6030 | P | And person 'P2' has the following row in table 'lo3_pl' | pl_id | geheim_ind | | P2 | 0 | And person 'P2' has the following rows in table 'lo3_pl_persoon' | pl_id | persoon_type | stapel_nr | volg_nr | burger_service_nr | geslachts_naam | geboorte_land_code | akte_nr | relatie_start_datum | relatie_start_plaats | relatie_start_land_code | verbintenis_soort | | P2 | P | 0 | 0 | 000000024 | P2 | 6030 | 1AA0100 | | | | | | P2 | R | 0 | 0 | 000000012 | P1 | | | 7 jaar geleden | 0518 | 6030 | P | @integratie Scenario Outline: '{naam1}' and '{naam2}' divorced {relatievedatum} Given the person 'P1' with citizen service number '000000012' And the person 'P2' with citizen service number '000000024' And 'P1' and 'P2' are married to each other And 'P1' and 'P2' divorced <relatieve datum> When the SQL statements generated from the Given steps have been executed Then person 'P1' has the following row in table 'lo3_pl' | pl_id | geheim_ind | | P1 | 0 | And person 'P1' has the following rows in table 'lo3_pl_persoon' | pl_id | persoon_type | stapel_nr | volg_nr | burger_service_nr | geslachts_naam | geboorte_land_code | akte_nr | relatie_start_datum | relatie_start_plaats | relatie_start_land_code | relatie_eind_datum | relatie_eind_plaats | relatie_eind_land_code | verbintenis_soort | | P1 | P | 0 | 0 | 000000012 | P1 | 6030 | 1AA0100 | | | | | | | | | P1 | R | 0 | 1 | 000000024 | P2 | | | gisteren - 20 jaar | 0518 | 6030 | | | | H | | P1 | R | 0 | 0 | 000000024 | P2 | | | | | | <relatieve datum> | 0518 | 6030 | H | And person 'P2' has the following row in table 'lo3_pl' | pl_id | geheim_ind | | P2 | 0 | And person 'P2' has the following rows in table 'lo3_pl_persoon' | pl_id | persoon_type | stapel_nr | volg_nr | burger_service_nr | geslachts_naam | geboorte_land_code | akte_nr | relatie_start_datum | relatie_start_plaats | relatie_start_land_code | relatie_eind_datum | relatie_eind_plaats | relatie_eind_land_code | verbintenis_soort | | P2 | P | 0 | 0 | 000000024 | P2 | 6030 | 1AA0100 | | | | | | | | | P2 | R | 0 | 1 | 000000012 | P1 | | | gisteren - 20 jaar | 0518 | 6030 | | | | H | | P2 | R | 0 | 0 | 000000012 | P1 | | | | | | <relatieve datum> | 0518 | 6030 | H | Examples: | relatieve datum | | 2 jaar geleden | | gisteren - 5 jaar | Scenario: '{naam1}' and '{naam2}' divorced on {dd-mm-yyyy datum} Given the person 'P1' with citizen service number '000000012' And the person 'P2' with citizen service number '000000024' And 'P1' and 'P2' are married to each other And 'P1' and 'P2' divorced 3-7-2023 When the SQL statements generated from the Given steps have been executed Then person 'P1' has the following row in table 'lo3_pl' | pl_id | geheim_ind | | P1 | 0 | And person 'P1' has the following rows in table 'lo3_pl_persoon' | pl_id | persoon_type | stapel_nr | volg_nr | burger_service_nr | geslachts_naam | geboorte_land_code | akte_nr | relatie_start_datum | relatie_start_plaats | relatie_start_land_code | relatie_eind_datum | relatie_eind_plaats | relatie_eind_land_code | verbintenis_soort | | P1 | P | 0 | 0 | 000000012 | P1 | 6030 | 1AA0100 | | | | | | | | | P1 | R | 0 | 1 | 000000024 | P2 | | | gisteren - 20 jaar | 0518 | 6030 | | | | H | | P1 | R | 0 | 0 | 000000024 | P2 | | | | | | 20230703 | 0518 | 6030 | H | And person 'P2' has the following row in table 'lo3_pl' | pl_id | geheim_ind | | P2 | 0 | And person 'P2' has the following rows in table 'lo3_pl_persoon' | pl_id | persoon_type | stapel_nr | volg_nr | burger_service_nr | geslachts_naam | geboorte_land_code | akte_nr | relatie_start_datum | relatie_start_plaats | relatie_start_land_code | relatie_eind_datum | relatie_eind_plaats | relatie_eind_land_code | verbintenis_soort | | P2 | P | 0 | 0 | 000000024 | P2 | 6030 | 1AA0100 | | | | | | | | | P2 | R | 0 | 1 | 000000012 | P1 | | | gisteren - 20 jaar | 0518 | 6030 | | | | H | | P2 | R | 0 | 0 | 000000012 | P1 | | | | | | 20230703 | 0518 | 6030 | H | @integratie Scenario Outline: next relationship: '{naam1}' and '{naam2}' married {relatievedatum} Given the person 'P1' with citizen service number '000000012' And the person 'P2' with citizen service number '000000024' And 'P1' and 'P2' are married to each other And 'P1' and 'P2' divorced 5 years ago And 'P1' and 'P2' married <relatieve datum> When the SQL statements generated from the Given steps have been executed Then person 'P1' has the following row in table 'lo3_pl' | pl_id | geheim_ind | | P1 | 0 | And person 'P1' has the following rows in table 'lo3_pl_persoon' | pl_id | persoon_type | stapel_nr | volg_nr | burger_service_nr | geslachts_naam | geboorte_land_code | akte_nr | relatie_start_datum | relatie_start_plaats | relatie_start_land_code | relatie_eind_datum | relatie_eind_plaats | relatie_eind_land_code | verbintenis_soort | | P1 | P | 0 | 0 | 000000012 | P1 | 6030 | 1AA0100 | | | | | | | | | P1 | R | 0 | 1 | 000000024 | P2 | | | gisteren - 20 jaar | 0518 | 6030 | | | | H | | P1 | R | 0 | 0 | 000000024 | P2 | | | | | | 5 jaar geleden | 0518 | 6030 | H | | P1 | R | 1 | 0 | 000000024 | P2 | | | <relatieve datum> | 0518 | 6030 | | | | H | And person 'P2' has the following row in table 'lo3_pl' | pl_id | geheim_ind | | P2 | 0 | And person 'P2' has the following rows in table 'lo3_pl_persoon' | pl_id | persoon_type | stapel_nr | volg_nr | burger_service_nr | geslachts_naam | geboorte_land_code | akte_nr | relatie_start_datum | relatie_start_plaats | relatie_start_land_code | relatie_eind_datum | relatie_eind_plaats | relatie_eind_land_code | verbintenis_soort | | P2 | P | 0 | 0 | 000000024 | P2 | 6030 | 1AA0100 | | | | | | | | | P2 | R | 0 | 1 | 000000012 | P1 | | | gisteren - 20 jaar | 0518 | 6030 | | | | H | | P2 | R | 0 | 0 | 000000012 | P1 | | | | | | 5 jaar geleden | 0518 | 6030 | H | | P2 | R | 1 | 0 | 000000012 | P1 | | | <relatieve datum> | 0518 | 6030 | | | | H | Examples: | relatieve datum | | 2 jaar geleden | | gisteren - 3 jaar | | vorige maand | @integratie Scenario: '{naam1}' and '{naam2}' married {relatievedatum1} and divorced {relatievedatum2} Given the person 'P1' with citizen service number '000000012' And the person 'P2' with citizen service number '000000024' And 'P1' and 'P2' married 6 years ago And 'P1' and 'P2' divorced 2 years ago When the SQL statements generated from the Given steps have been executed Then person 'P1' has the following row in table 'lo3_pl' | pl_id | geheim_ind | | P1 | 0 | And person 'P1' has the following rows in table 'lo3_pl_persoon' | pl_id | persoon_type | stapel_nr | volg_nr | burger_service_nr | geslachts_naam | geboorte_land_code | akte_nr | relatie_start_datum | relatie_start_plaats | relatie_start_land_code | relatie_eind_datum | relatie_eind_plaats | relatie_eind_land_code | verbintenis_soort | | P1 | P | 0 | 0 | 000000012 | P1 | 6030 | 1AA0100 | | | | | | | | | P1 | R | 0 | 1 | 000000024 | P2 | | | 6 jaar geleden | 0518 | 6030 | | | | H | | P1 | R | 0 | 0 | 000000024 | P2 | | | | | | 2 jaar geleden | 0518 | 6030 | H | And person 'P2' has the following row in table 'lo3_pl' | pl_id | geheim_ind | | P2 | 0 | And person 'P2' has the following rows in table 'lo3_pl_persoon' | pl_id | persoon_type | stapel_nr | volg_nr | burger_service_nr | geslachts_naam | geboorte_land_code | akte_nr | relatie_start_datum | relatie_start_plaats | relatie_start_land_code | relatie_eind_datum | relatie_eind_plaats | relatie_eind_land_code | verbintenis_soort | | P2 | P | 0 | 0 | 000000024 | P2 | 6030 | 1AA0100 | | | | | | | | | P2 | R | 0 | 1 | 000000012 | P1 | | | 6 jaar geleden | 0518 | 6030 | | | | H | | P2 | R | 0 | 0 | 000000012 | P1 | | | | | | 2 jaar geleden | 0518 | 6030 | H | @integratie Scenario: the persons married, divorced and then married someone else Given the person 'P1' with citizen service number '000000012' And the person 'P2' with citizen service number '000000024' And the person 'P3' with citizen service number '000000036' And the person 'P4' with citizen service number '000000048' And 'P1' and 'P2' married 10 years ago And 'P1' and 'P2' divorced 7 years ago And 'P1' and 'P4' married 5 years ago And 'P2' and 'P3' married 3 years ago When the SQL statements generated from the Given steps have been executed Then person 'P1' has the following row in table 'lo3_pl' | pl_id | geheim_ind | | P1 | 0 | And person 'P1' has the following rows in table 'lo3_pl_persoon' | pl_id | persoon_type | stapel_nr | volg_nr | burger_service_nr | geslachts_naam | geboorte_land_code | akte_nr | relatie_start_datum | relatie_start_plaats | relatie_start_land_code | relatie_eind_datum | relatie_eind_plaats | relatie_eind_land_code | verbintenis_soort | | P1 | P | 0 | 0 | 000000012 | P1 | 6030 | 1AA0100 | | | | | | | | | P1 | R | 0 | 1 | 000000024 | P2 | | | 10 jaar geleden | 0518 | 6030 | | | | H | | P1 | R | 0 | 0 | 000000024 | P2 | | | | | | 7 jaar geleden | 0518 | 6030 | H | | P1 | R | 1 | 0 | 000000048 | P4 | | | 5 jaar geleden | 0518 | 6030 | | | | H | And person 'P2' has the following row in table 'lo3_pl' | pl_id | geheim_ind | | P2 | 0 | And person 'P2' has the following rows in table 'lo3_pl_persoon' | pl_id | persoon_type | stapel_nr | volg_nr | burger_service_nr | geslachts_naam | geboorte_land_code | akte_nr | relatie_start_datum | relatie_start_plaats | relatie_start_land_code | relatie_eind_datum | relatie_eind_plaats | relatie_eind_land_code | verbintenis_soort | | P2 | P | 0 | 0 | 000000024 | P2 | 6030 | 1AA0100 | | | | | | | | | P2 | R | 0 | 1 | 000000012 | P1 | | | 10 jaar geleden | 0518 | 6030 | | | | H | | P2 | R | 0 | 0 | 000000012 | P1 | | | | | | 7 jaar geleden | 0518 | 6030 | H | | P2 | R | 1 | 0 | 000000036 | P3 | | | 3 jaar geleden | 0518 | 6030 | | | | H | And person 'P3' has the following row in table 'lo3_pl' | pl_id | geheim_ind | | P3 | 0 | And person 'P3' has the following rows in table 'lo3_pl_persoon' | pl_id | persoon_type | stapel_nr | volg_nr | burger_service_nr | geslachts_naam | geboorte_land_code | akte_nr | relatie_start_datum | relatie_start_plaats | relatie_start_land_code | relatie_eind_datum | relatie_eind_plaats | relatie_eind_land_code | verbintenis_soort | | P3 | P | 0 | 0 | 000000036 | P3 | 6030 | 1AA0100 | | | | | | | | | P3 | R | 0 | 0 | 000000024 | P2 | | | 3 jaar geleden | 0518 | 6030 | | | | H | And person 'P4' has the following row in table 'lo3_pl' | pl_id | geheim_ind | | P4 | 0 | And person 'P4' has the following rows in table 'lo3_pl_persoon' | pl_id | persoon_type | stapel_nr | volg_nr | burger_service_nr | geslachts_naam | geboorte_land_code | akte_nr | relatie_start_datum | relatie_start_plaats | relatie_start_land_code | relatie_eind_datum | relatie_eind_plaats | relatie_eind_land_code | verbintenis_soort | | P4 | P | 0 | 0 | 000000048 | P4 | 6030 | 1AA0100 | | | | | | | | | P4 | R | 0 | 0 | 000000012 | P1 | | | 5 jaar geleden | 0518 | 6030 | | | | H | @integratie Scenario: the persons married, divorced and remarried Given the person 'P1' with citizen service number '000000012' And the person 'P2' with citizen service number '000000024' And 'P1' and 'P2' married 10 years ago And 'P1' and 'P2' divorced 7 years ago And 'P1' and 'P2' remarried 5 years ago When the SQL statements generated from the Given steps have been executed Then person 'P1' has the following row in table 'lo3_pl' | pl_id | geheim_ind | | P1 | 0 | And person 'P1' has the following rows in table 'lo3_pl_persoon' | pl_id | persoon_type | stapel_nr | volg_nr | burger_service_nr | geslachts_naam | geboorte_land_code | akte_nr | relatie_start_datum | relatie_start_plaats | relatie_start_land_code | relatie_eind_datum | relatie_eind_plaats | relatie_eind_land_code | verbintenis_soort | | P1 | P | 0 | 0 | 000000012 | P1 | 6030 | 1AA0100 | | | | | | | | | P1 | R | 0 | 1 | 000000024 | P2 | | | 10 jaar geleden | 0518 | 6030 | | | | H | | P1 | R | 0 | 0 | 000000024 | P2 | | | | | | 7 jaar geleden | 0518 | 6030 | H | | P1 | R | 1 | 0 | 000000024 | P2 | | | 5 jaar geleden | 0518 | 6030 | | | | H | And person 'P2' has the following row in table 'lo3_pl' | pl_id | geheim_ind | | P2 | 0 | And person 'P2' has the following rows in table 'lo3_pl_persoon' | pl_id | persoon_type | stapel_nr | volg_nr | burger_service_nr | geslachts_naam | geboorte_land_code | akte_nr | relatie_start_datum | relatie_start_plaats | relatie_start_land_code | relatie_eind_datum | relatie_eind_plaats | relatie_eind_land_code | verbintenis_soort | | P2 | P | 0 | 0 | 000000024 | P2 | 6030 | 1AA0100 | | | | | | | | | P2 | R | 0 | 1 | 000000012 | P1 | | | 10 jaar geleden | 0518 | 6030 | | | | H | | P2 | R | 0 | 0 | 000000012 | P1 | | | | | | 7 jaar geleden | 0518 | 6030 | H | | P2 | R | 1 | 0 | 000000012 | P1 | | | 5 jaar geleden | 0518 | 6030 | | | | H | Scenario Outline: the registered partnership of '{naam1} en {naam2}' was dissolved {relatieve datum} Given the person 'P1' with citizen service number '000000012' And the person 'P2' with citizen service number '000000024' And 'P1' and 'P2' entered into a registered partnership 7 years ago And the registered partnership of 'P1' and 'P2' was dissolved <datum> When the SQL statements generated from the Given steps have been executed Then person 'P1' has the following row in table 'lo3_pl' | pl_id | geheim_ind | | P1 | 0 | And person 'P1' has the following rows in table 'lo3_pl_persoon' | pl_id | persoon_type | stapel_nr | volg_nr | burger_service_nr | geslachts_naam | geboorte_land_code | akte_nr | relatie_start_datum | relatie_start_plaats | relatie_start_land_code | relatie_eind_datum | relatie_eind_plaats | relatie_eind_land_code | verbintenis_soort | | P1 | P | 0 | 0 | 000000012 | P1 | 6030 | 1AA0100 | | | | | | | | | P1 | R | 0 | 1 | 000000024 | P2 | | | 7 jaar geleden | 0518 | 6030 | | | | P | | P1 | R | 0 | 0 | 000000024 | P2 | | | | | | <yyyymmdd formaat> | 0518 | 6030 | P | And person 'P2' has the following row in table 'lo3_pl' | pl_id | geheim_ind | | P2 | 0 | And person 'P2' has the following rows in table 'lo3_pl_persoon' | pl_id | persoon_type | stapel_nr | volg_nr | burger_service_nr | geslachts_naam | geboorte_land_code | akte_nr | relatie_start_datum | relatie_start_plaats | relatie_start_land_code | relatie_eind_datum | relatie_eind_plaats | relatie_eind_land_code | verbintenis_soort | | P2 | P | 0 | 0 | 000000024 | P2 | 6030 | 1AA0100 | | | | | | | | | P2 | R | 0 | 1 | 000000012 | P1 | | | 7 jaar geleden | 0518 | 6030 | | | | P | | P2 | R | 0 | 0 | 000000012 | P1 | | | | | | <yyyymmdd formaat> | 0518 | 6030 | P | Examples: | datum | yyyymmdd formaat | | gisteren - 7 jaar | gisteren - 7 jaar | | vorige maand - 16 jaar | vorige maand - 16 jaar | | dit jaar - 5 jaar | dit jaar - 5 jaar | | 5 jaar geleden | 5 jaar geleden | | in 2021 | 20210000 | | 28-3-2021 | 20210328 | | op 28-3-2021 | 20210328 |