HAALCENTRAAL English translation
BRP API / Personen / Features / geboorte

Step definitions for specifying authority relationships

# language: en
@integratie @stap-documentatie
Feature: Step definitions for specifying authority relationships

  Rule: Majority, minority and birth are added to the person

    @integratie
    Scenario: '{naam}' is a minor
      Given the person 'P2' has the following data
        | burgerservicenummer (01.20) | geslachtsnaam (02.40) |
        |                   000000012 | P2                    |
      Given the person 'P1' has the following data
        | burgerservicenummer (01.20) | geslachtsnaam (02.40) |
        |                   000000024 | P1                    |
      And person 'P2'
      * is a minor
      When the SQL statements generated from the Given steps have been executed
      Then person 'P2' has the following row in table 'lo3_pl'
        | pl_id | geheim_ind |
        | P2    |          0 |
      And person 'P2' has the following row in table 'lo3_pl_persoon'
        | pl_id | persoon_type | stapel_nr | volg_nr | burger_service_nr | geslachts_naam | geboorte_datum     |
        | P2    | P            |         0 |       0 |         000000012 | P2             | gisteren - 17 jaar |
      And person 'P1' has the following row in table 'lo3_pl'
        | pl_id | geheim_ind |
        | P1    |          0 |
      And person 'P1' has the following row in table 'lo3_pl_persoon'
        | pl_id | persoon_type | stapel_nr | volg_nr | burger_service_nr | geslachts_naam |
        | P1    | P            |         0 |       0 |         000000024 | P1             |

    @integratie
    Scenario: is of full age
      Given the person 'P1' with citizen service number '000000012'
      * is of full age
      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_datum     | geboorte_land_code | akte_nr |
        | P1    | P            |         0 |       0 |         000000012 | P1             | gisteren - 45 jaar |               6030 | 1AA0100 |

    @integratie
    Scenario: is a minor
      Given the person 'P1' with citizen service number '000000012'
      * is a minor
      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_datum     | geboorte_land_code | akte_nr |
        | P1    | P            |         0 |       0 |         000000012 | P1             | gisteren - 17 jaar |               6030 | 1AA0100 |

    @integratie
    Scenario: '{naam}' is a minor
      Given the person 'P1' with citizen service number '000000012'
      And the person 'P2' with citizen service number '000000024'
      And 'P1' is a minor
      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_datum     | geboorte_land_code | akte_nr |
        | P1    | P            |         0 |       0 |         000000012 | P1             | gisteren - 17 jaar |               6030 | 1AA0100 |
      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 |
        | P2    | P            |         0 |       0 |         000000024 | P2             |               6030 | 1AA0100 |

    @integratie
    Scenario: '{naam}' was born {relatievedatum}
      Given the person 'P1' with citizen service number '000000012'
      And the person 'P2' with citizen service number '000000024'
      And 'P1' was born <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_datum    | geboorte_land_code | akte_nr |
        | P1    | P            |         0 |       0 |         000000012 | P1             | <relatieve datum> |               6030 | 1AA0100 |
      And person 'P2' has the following row in table 'lo3_pl'
        | pl_id | geheim_ind |
        | P2    |          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 |
        | P2    | P            |         0 |       0 |         000000024 | P2             |               6030 | 1AA0100 |

      Examples:
        | relatieve datum |
        | gisteren        |
        |  2 jaar geleden |
        | vorige maand    |

    @integratie
    Scenario: '{naam}' was born on {datum}
      # the date has the format d-m-y, where d and m have 1 or 2 digits and y has 4 digits
      # with the (optional) name the context changes to this person
      Given the person 'P1' with citizen service number '000000012'
      And the person 'P2' with citizen service number '000000024'
      And 'P1' was born on <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_datum  | geboorte_land_code | akte_nr |
        | P1    | P            |         0 |       0 |         000000012 | P1             | <geboortedatum> |               6030 | 1AA0100 |
      And person 'P2' has the following row in table 'lo3_pl'
        | pl_id | geheim_ind |
        | P2    |          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 |
        | P2    | P            |         0 |       0 |         000000024 | P2             |               6030 | 1AA0100 |

      Examples:
        | datum      | geboortedatum |
        | 31-12-2022 |      20221231 |
        |   1-1-2023 |      20230101 |

    @integratie
    Scenario: was born on {datum}
      # the date has the format d-m-y, where d and m have 1 or 2 digits and y has 4 digits
      Given the person 'P1' with citizen service number '000000012'
      * 'P1' was born on <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_datum  | geboorte_land_code | akte_nr |
        | P1    | P            |         0 |       0 |         000000012 | P1             | <geboortedatum> |               6030 | 1AA0100 |

      Examples:
        | datum      | geboortedatum |
        | 31-12-2022 |      20221231 |
        |   1-1-2023 |      20230101 |

    @integratie
    Scenario Outline: was born in {land}
      Given the person 'P1' with citizen service number '000000012'
      * was born in <land>
      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 |
        | P1    | P            |         0 |       0 |         000000012 | P1             | <landcode>         |

      Examples:
        | land        | landcode |
        | België      |     5010 |
        | Spanje      |     6037 |
        | Duitsland   |     6029 |
        | Afghanistan |     6023 |