HAALCENTRAAL English translation
BRP API / Personen / Features / leeftijd

supplying the age of the minor in an authority relationship

# language: en
Feature: supplying the age of the minor in an authority relationship

  Background:
    Given the person 'Saskia' with citizen service number '000000012'
    * is of full age
    And the person 'Maarten' with citizen service number '000000024'
    * is of full age
    And 'Saskia' and 'Maarten' are married to each other with the following data
      | datum huwelijkssluiting/aangaan geregistreerd partnerschap (06.10) |
      |                                                           20000401 |
    And the person 'Rachel' with citizen service number '000000036'
    * has 'Saskia' as parent 1
    * was born in the Netherlands
    * is registered in the BRP

  @info-api
  Rule: the leeftijd of a minor is not supplied where the date of birth is entirely unknown, where only the year of the date of birth is known, or where only the day of the date of birth is unknown and the month of birth equals the current month

    Scenario Outline: the date of birth of the minor is a complete date
      Given the person 'Rachel' has the following data
        | geboortedatum (03.10) |
        | <geboortedatum>       |
      When 'gezag' is requested for persons searched by citizen service number of 'Rachel'
      Then the authority over 'Rachel' is joint authority with parent 'Saskia' and third party 'Maarten'
      And the minor has the following data
        | leeftijd   |
        | <leeftijd> |

      Examples:
        | geboortedatum          | leeftijd |
        | vandaag - 10 jaar      |       10 |
        | gisteren - 15 jaar     |       15 |
        | morgen - 18 jaar       |       17 |
        | vorige maand - 12 jaar |       12 |

    Scenario Outline: the day of birth of the minor is unknown and the month of birth is not the current month
      Given the person 'Rachel' has the following data
        | geboortedatum (03.10) |
        | <geboortedatum>       |
      When 'gezag' is requested for persons searched by citizen service number of 'Rachel'
      Then the authority over 'Rachel' is joint authority with parent 'Saskia' and third party 'Maarten'
      And the minor has the following data
        | leeftijd   |
        | <leeftijd> |

      Examples:
        | geboortedatum            | leeftijd |
        | vorige maand - 12 jaar   |       12 |
        | volgende maand - 16 jaar |       15 |

    Scenario: the day of birth of the minor is unknown and the month of birth is the current month
      Given the person 'Rachel' has the following data
        | geboortedatum (03.10) |
        | deze maand - 10 jaar  |
      When 'gezag' is requested for persons searched by citizen service number of 'Rachel'
      Then the authority over 'Rachel' is joint authority with parent 'Saskia' and third party 'Maarten'
      And the minor has no age

  @gezag-api
  Rule: the date of birth of a minor is always supplied

    Scenario Outline: the date of birth of the minor is supplied
      Given the person 'Rachel' has the following data
        | geboortedatum (03.10) |
        | <geboortedatum>       |
      When 'gezag' is requested for persons searched by citizen service number of 'Rachel'
      Then the authority over 'Rachel' is joint authority with parent 'Saskia' and third party 'Maarten'
      And the minor has the following data
        | geboorte.datum  |
        | <geboortedatum> |

      Examples:
        | geboortedatum            |
        | vandaag - 10 jaar        |
        | gisteren - 15 jaar       |
        | morgen - 18 jaar         |
        | vorige maand - 12 jaar   |
        | deze maand - 14 jaar     |
        | volgende maand - 16 jaar |
        | vorig jaar - 9 jaar      |
        | volgend jaar - 8 jaar    |
        |           5 jaar geleden |