HAALCENTRAAL English translation
BRP API / Personen / Features / gegeven-stap-definities-gezagsrelaties

Given authority relationship step definitions

# language: en
@stap-documentatie @data-api @info-api 
Feature: Given authority relationship step definitions

  Background:
    Given the person 'P1' has the following data
      | burgerservicenummer (01.20) | geslachtsnaam (02.40) |
      |                   000000012 | Jansen                |
    And the person 'P2' has the following data
      | burgerservicenummer (01.20) | geslachtsnaam (02.40) | geboortedatum (03.10) |
      |                   000000013 | Pietersen             |              20000201 |
    Given the person 'P3' has the following data
      | burgerservicenummer (01.20) | geslachtsnaam (02.40) |
      |                   000000014 | Maassen               |

  Rule: the gezag API mock must always supply gezag for the data API, regardless of whether a scenario is executed in the info-api or data-api context.

  @deprecated
  Scenario: the person has a sole parental authority relationship
    Given 'P1' has the following authority relationships
    * sole parental authority over 'P2' with parent 'P1'
    Then the gezag response body equals
      """
      [
        {
          "burgerservicenummer": "000000012",
          "gezag": [
            {
              "type": "EenhoofdigOuderlijkGezag",
              "minderjarige": {
                "burgerservicenummer": "000000013"
              },
              "ouder": {
                "burgerservicenummer": "000000012"
              }
            }
          ]
        }
      ]
      """

  @nieuw
  Scenario: the person has a sole parental authority relationship
    Given 'P1' has the following authority relationships
    * sole parental authority over 'P2' with parent 'P1'
    Then the gezag response body equals
      """
      [
        {
          "burgerservicenummer": "000000012",
          "gezag": [
            {
              "type": "EenhoofdigOuderlijkGezag",
              "minderjarige": {
                "burgerservicenummer": "000000013",
                "geboorte": {
                  "datum": "20000201"
                },
                "naam": {
                  "geslachtsnaam": "Pietersen"
                }
              },
              "ouder": {
                "burgerservicenummer": "000000012",
                "naam": {
                  "geslachtsnaam": "Jansen"
                }
              }
            }
          ]
        }
      ]
      """

  @deprecated
  Scenario: the person has a joint parental authority relationship
    Given 'P1' has the following authority relationships
    * joint parental authority over 'P2' with parent 'P1' and parent 'P3'
    Then the gezag response body equals
      """
      [
        {
          "burgerservicenummer": "000000012",
          "gezag": [
            {
              "type": "TweehoofdigOuderlijkGezag",
              "minderjarige": {
                "burgerservicenummer": "000000013"
              },
              "ouders": [
                {
                  "burgerservicenummer": "000000012"
                },
                {
                  "burgerservicenummer": "000000014"
                }
              ]
            }
          ]
        }
      ]
      """

  @nieuw
  Scenario: the person has a joint parental authority relationship
    Given 'P1' has the following authority relationships
    * joint parental authority over 'P2' with parent 'P1' and parent 'P3'
    Then the gezag response body equals
      """
      [
        {
          "burgerservicenummer": "000000012",
          "gezag": [
            {
              "type": "GezamenlijkOuderlijkGezag",
              "minderjarige": {
                "burgerservicenummer": "000000013",
                "geboorte": {
                  "datum": "20000201"
                },
                "naam": {
                  "geslachtsnaam": "Pietersen"
                }
              },
              "ouders": [
                {
                  "burgerservicenummer": "000000012",
                  "naam": {
                    "geslachtsnaam": "Jansen"
                  }
                },
                {
                  "burgerservicenummer": "000000014",
                  "naam": {
                    "geslachtsnaam": "Maassen"
                  }
                }
              ]
            }
          ]
        }
      ]
      """

  @deprecated
  Scenario: the person has a joint authority relationship
    Given 'P1' has the following authority relationships
    * joint authority over 'P2' with parent 'P1' and third party 'P3'
    Then the gezag response body equals
      """
      [
        {
          "burgerservicenummer": "000000012",
          "gezag": [
            {
              "type": "GezamenlijkGezag",
              "minderjarige": {
                "burgerservicenummer": "000000013"
              },
              "ouder": {
                "burgerservicenummer": "000000012"
              },
              "derde": {
                "type": "BekendeDerde",
                "burgerservicenummer": "000000014"
              }
            }
          ]
        }
      ]
      """

  @nieuw
  Scenario: the person has a joint authority relationship
    Given 'P1' has the following authority relationships
    * joint authority over 'P2' with parent 'P1' and third party 'P3'
    Then the gezag response body equals
      """
      [
        {
          "burgerservicenummer": "000000012",
          "gezag": [
            {
              "type": "GezamenlijkGezag",
              "minderjarige": {
                "burgerservicenummer": "000000013",
                "geboorte": {
                  "datum": "20000201"
                },
                "naam": {
                  "geslachtsnaam": "Pietersen"
                }
              },
              "ouder": {
                "burgerservicenummer": "000000012",
                "naam": {
                  "geslachtsnaam": "Jansen"
                }
              },
              "derde": {
                "type": "BekendeDerde",
                "burgerservicenummer": "000000014",
                "naam": {
                  "geslachtsnaam": "Maassen"
                }
              }
            }
          ]
        }
      ]
      """

  @deprecated
  Scenario: the person has a joint authority relationship with an unknown third party
    Given 'P1' has the following authority relationships
    * joint authority over 'P2' with parent 'P1' and an unknown third party
    Then the gezag response body equals
      """
      [
        {
          "burgerservicenummer": "000000012",
          "gezag": [
            {
              "type": "GezamenlijkGezag",
              "minderjarige": {
                "burgerservicenummer": "000000013"
              },
              "ouder": {
                "burgerservicenummer": "000000012"
              },
              "derde": {
                "type": "OnbekendeDerde"
              }
            }
          ]
        }
      ]
      """

  @nieuw
  Scenario: the person has a joint authority relationship with an unknown third party
    Given 'P1' has the following authority relationships
    * joint authority over 'P2' with parent 'P1' and an unknown third party
    Then the gezag response body equals
      """
      [
        {
          "burgerservicenummer": "000000012",
          "gezag": [
            {
              "type": "GezamenlijkGezag",
              "minderjarige": {
                "burgerservicenummer": "000000013",
                "geboorte": {
                  "datum": "20000201"
                },
                "naam": {
                  "geslachtsnaam": "Pietersen"
                }
              },
              "ouder": {
                "burgerservicenummer": "000000012",
                "naam": {
                  "geslachtsnaam": "Jansen"
                }
              },
              "derde": {
                "type": "OnbekendeDerde"
              }
            }
          ]
        }
      ]
      """

  @deprecated
  Scenario: the person has a guardianship authority relationship
    Given 'P1' has the following authority relationships
    * guardianship over 'P2'
    Then the gezag response body equals
      """
      [
        {
          "burgerservicenummer": "000000012",
          "gezag": [
            {
              "type": "Voogdij",
              "minderjarige": {
                "burgerservicenummer": "000000013"
              },
              "derden": []
            }
          ]
        }
      ]
      """

  @nieuw
  Scenario: the person has a guardianship authority relationship
    Given 'P1' has the following authority relationships
    * guardianship over 'P2'
    Then the gezag response body equals
      """
      [
        {
          "burgerservicenummer": "000000012",
          "gezag": [
            {
              "type": "Voogdij",
              "minderjarige": {
                "burgerservicenummer": "000000013",
                "geboorte": {
                  "datum": "20000201"
                },
                "naam": {
                  "geslachtsnaam": "Pietersen"
                }
              },
              "derden": []
            }
          ]
        }
      ]
      """

  @deprecated
  Scenario: the person has a guardianship authority relationship with a known third party
    Given 'P1' has the following authority relationships
    * guardianship over 'P2' with third party 'P1'
    Then the gezag response body equals
      """
      [
        {
          "burgerservicenummer": "000000012",
          "gezag": [
            {
              "type": "Voogdij",
              "minderjarige": {
                "burgerservicenummer": "000000013"
              },
              "derden": [
                {
                  "type": "BekendeDerde",
                  "burgerservicenummer": "000000012"
                }
              ]
            }
          ]
        }
      ]
      """

  @nieuw
  Scenario: the person has a guardianship authority relationship with a known third party
    Given 'P1' has the following authority relationships
    * guardianship over 'P2' with third party 'P1'
    Then the gezag response body equals
      """
      [
        {
          "burgerservicenummer": "000000012",
          "gezag": [
            {
              "type": "Voogdij",
              "minderjarige": {
                "burgerservicenummer": "000000013",
                "geboorte": {
                  "datum": "20000201"
                },
                "naam": {
                  "geslachtsnaam": "Pietersen"
                }
              },
              "derden": [
                {
                  "type": "BekendeDerde",
                  "burgerservicenummer": "000000012",
                  "naam": {
                    "geslachtsnaam": "Jansen"
                  }
                }
              ]
            }
          ]
        }
      ]
      """

  @deprecated
  Scenario: the person temporarily has no authority
    Given 'P1' has the following authority relationships
    * temporarily no authority over 'P2', with the explanation 'tijdelijk geen gezag'
    Then the gezag response body equals
      """
      [
        {
          "burgerservicenummer": "000000012",
          "gezag": [
            {
              "type": "TijdelijkGeenGezag",
              "minderjarige": {
                "burgerservicenummer": "000000013"
              },
              "toelichting": "tijdelijk geen gezag"
            }
          ]
        }
      ]
      """

  @nieuw
  Scenario: the person temporarily has no authority
    Given 'P1' has the following authority relationships
    * temporarily no authority over 'P2', with the explanation 'tijdelijk geen gezag'
    Then the gezag response body equals
      """
      [
        {
          "burgerservicenummer": "000000012",
          "gezag": [
            {
              "type": "TijdelijkGeenGezag",
              "minderjarige": {
                "burgerservicenummer": "000000013",
                "geboorte": {
                  "datum": "20000201"
                },
                "naam": {
                  "geslachtsnaam": "Pietersen"
                }
              },
              "toelichting": "tijdelijk geen gezag"
            }
          ]
        }
      ]
      """

  @deprecated
  Scenario: the authority over the person cannot be determined
    Given 'P1' has the following authority relationships
    * authority over 'P2' cannot be determined, with the explanation 'gezag is niet te bepalen'
    Then the gezag response body equals
      """
      [
        {
          "burgerservicenummer": "000000012",
          "gezag": [
            {
              "type": "GezagNietTeBepalen",
              "minderjarige": {
                "burgerservicenummer": "000000013"
              },
              "toelichting": "gezag is niet te bepalen"
            }
          ]
        }
      ]
      """

  @nieuw
  Scenario: the authority over the person cannot be determined
    Given 'P1' has the following authority relationships
    * authority over 'P2' cannot be determined, with the explanation 'gezag is niet te bepalen'
    Then the gezag response body equals
      """
      [
        {
          "burgerservicenummer": "000000012",
          "gezag": [
            {
              "type": "GezagNietTeBepalen",
              "minderjarige": {
                "burgerservicenummer": "000000013",
                "geboorte": {
                  "datum": "20000201"
                },
                "naam": {
                  "geslachtsnaam": "Pietersen"
                }
              },
              "toelichting": "gezag is niet te bepalen"
            }
          ]
        }
      ]
      """

  Scenario: the person has no holder of authority
    Given 'P1' has no holder of authority
    Then the gezag response body equals
      """
      [
        {
          "burgerservicenummer": "000000012",
          "gezag": []
        }
      ]
      """

  @deprecated
  Scenario: the authority over the person is under investigation
    Given 'P1' has the following authority relationships
    * sole parental authority over 'P2' with parent 'P1'
    * the authority is under investigation
    Then the gezag response body equals
      """
      [
        {
          "burgerservicenummer": "000000012",
          "gezag": [
            {
              "type": "EenhoofdigOuderlijkGezag",
              "minderjarige": {
                "burgerservicenummer": "000000013"
              },
              "ouder": {
                "burgerservicenummer": "000000012"
              },
              "inOnderzoek": true
            }
          ]
        }
      ]
      """

  @nieuw
  Scenario: the authority over the person is under investigation
    Given 'P1' has the following authority relationships
    * sole parental authority over 'P2' with parent 'P1'
    * the authority is under investigation
    Then the gezag response body equals
      """
      [
        {
          "burgerservicenummer": "000000012",
          "gezag": [
            {
              "type": "EenhoofdigOuderlijkGezag",
              "minderjarige": {
                "burgerservicenummer": "000000013",
                "geboorte": {
                  "datum": "20000201"
                },
                "naam": {
                  "geslachtsnaam": "Pietersen"
                }
              },
              "ouder": {
                "burgerservicenummer": "000000012",
                "naam": {
                  "geslachtsnaam": "Jansen"
                }
              },
              "inOnderzoek": true
            }
          ]
        }
      ]
      """