HAALCENTRAAL English translation
BRP API / Personen / Features / fields

GezagPersoonBeperkt: requesting naam fields with fields

#language: en

Feature: GezagPersoonBeperkt: requesting naam fields with fields

    Background:
      Given the person with citizen service number '000000152' has the following data
      | naam                                 | waarde     |
      | voornamen (02.10)                    | Jan Pieter |
      | adellijke titel of predicaat (02.20) | JH         |
      | voorvoegsel (02.30)                  | van        |
      | geslachtsnaam (02.40)                | Maassen    |
      | geslachtsaanduiding (04.10)          | M          |
      And the person has the following 'verblijfplaats' data
      | gemeente van inschrijving (09.10) |
      | 0599                              |
      And the 'verblijfplaats' has the following 'adres' data
      | gemeentecode (92.10) | identificatiecode verblijfplaats (11.80) |
      | 0599                 | 0599010051001502                         |

    Scenario: 'voornamen (02.10)' is requested with field path 'naam.voornamen'
      When persons are searched with the following parameters
      | naam                             | waarde                                  |
      | type                             | ZoekMetAdresseerbaarObjectIdentificatie |
      | adresseerbaarObjectIdentificatie | 0599010051001502                        |
      | fields                           | naam.voornamen                          |
      Then the response has a person with the following 'naam' data
      | naam      | waarde     |
      | voornamen | Jan Pieter |

    Scenario: 'voorvoegsel (02.30)' is requested with field path 'naam.voorvoegsel'
      When persons are searched with the following parameters
      | naam                             | waarde                                  |
      | type                             | ZoekMetAdresseerbaarObjectIdentificatie |
      | adresseerbaarObjectIdentificatie | 0599010051001502                        |
      | fields                           | naam.voorvoegsel                        |
      Then the response has a person with the following 'naam' data
      | naam        | waarde |
      | voorvoegsel | van    |

    Scenario: 'geslachtsnaam (02.40)' is requested with field path 'naam.geslachtsnaam'
      When persons are searched with the following parameters
      | naam                             | waarde                                  |
      | type                             | ZoekMetAdresseerbaarObjectIdentificatie |
      | adresseerbaarObjectIdentificatie | 0599010051001502                        |
      | fields                           | naam.geslachtsnaam                      |
      Then the response has a person with the following 'naam' data
      | naam          | waarde  |
      | geslachtsnaam | Maassen |

    Scenario: 'adellijke titel of predicaat (02.20)' is requested with field path '<fields>'
      When persons are searched with the following parameters
      | naam                             | waarde                                  |
      | type                             | ZoekMetAdresseerbaarObjectIdentificatie |
      | adresseerbaarObjectIdentificatie | 0599010051001502                        |
      | fields                           | <fields>                                |
      Then the response has a person with the following 'naam' data
      | naam                                 | waarde    |
      | adellijkeTitelPredicaat.code         | JH        |
      | adellijkeTitelPredicaat.omschrijving | jonkheer  |
      | adellijkeTitelPredicaat.soort        | predicaat |

      Examples:
      | fields                                    |
      | naam.adellijkeTitelPredicaat              |
      | naam.adellijkeTitelPredicaat.code         |
      | naam.adellijkeTitelPredicaat.omschrijving |
      | naam.adellijkeTitelPredicaat.soort        |

    Scenario: 'voorletters' is requested with field path 'naam.voorletters'
      When persons are searched with the following parameters
      | naam                             | waarde                                  |
      | type                             | ZoekMetAdresseerbaarObjectIdentificatie |
      | adresseerbaarObjectIdentificatie | 0599010051001502                        |
      | fields                           | naam.voorletters                        |
      Then the response has a person with the following 'naam' data
      | naam        | waarde |
      | voorletters | J.P.   |

    Scenario: 'volledige naam' is requested with field path 'naam.volledigeNaam'
      When persons are searched with the following parameters
      | naam                             | waarde                                  |
      | type                             | ZoekMetAdresseerbaarObjectIdentificatie |
      | adresseerbaarObjectIdentificatie | 0599010051001502                        |
      | fields                           | naam.volledigeNaam                      |
      Then the response has a person with the following 'naam' data
      | naam          | waarde                          |
      | volledigeNaam | jonkheer Jan Pieter van Maassen |

    Scenario Outline: the field requested has no value
      Given the person with citizen service number '000000012' has the following data
      | naam                  | waarde |
      | geslachtsnaam (02.40) | Vos    |
      And the person has the following 'verblijfplaats' data
      | gemeente van inschrijving (09.10) |
      | 0599                              |
      And the 'verblijfplaats' has the following 'adres' data
      | gemeentecode (92.10) | identificatiecode verblijfplaats (11.80) |
      | 0599                 | 0599010051001503                         |
      When persons are searched with the following parameters
      | naam                             | waarde                                  |
      | type                             | ZoekMetAdresseerbaarObjectIdentificatie |
      | adresseerbaarObjectIdentificatie | 0599010051001503                        |
      | fields                           | <fields>                                |
      Then the response has a person without 'naam' data

      Examples:
      | fields           |
      | naam.voornamen   |
      | naam.voorvoegsel |

    Scenario: the field requested has the default value
      Given the person with citizen service number '000000152' has the following data
      | naam                  | waarde |
      | geslachtsnaam (02.40) | .      |
      And the person has the following 'verblijfplaats' data
      | gemeente van inschrijving (09.10) |
      | 0599                              |
      And the 'verblijfplaats' has the following 'adres' data
      | gemeentecode (92.10) | identificatiecode verblijfplaats (11.80) |
      | 0599                 | 0599010051001503                         |
      When persons are searched with the following parameters
      | naam                             | waarde                                  |
      | type                             | ZoekMetAdresseerbaarObjectIdentificatie |
      | adresseerbaarObjectIdentificatie | 0599010051001503                        |
      | fields                           | naam.geslachtsnaam                      |
      Then the response has a person without 'naam' data