HAALCENTRAAL English translation
BRP API / Personen / Features / dan-stap-definities-gezagsrelatie

Authority relationship Then step definitions

#language: en

@stap-documentatie
Feature: Authority relationship Then step definitions

  Scenario: Then the response has a person with a 'gezag' with (only) the following data
    Given the response body equals
    """
    {
      "personen": [
        {
          "gezag": [
            {
              "type": "TweehoofdigOuderlijkGezag",
              "minderjarige": {
                "burgerservicenummer": "000000012"
              }
            }
          ]
        }
      ]
    }
    """
    Then the response has a person with a 'gezag' with the following data
    | type                      | minderjarige.burgerservicenummer |
    | TweehoofdigOuderlijkGezag | 000000012                        |

  Scenario: Then the person has a 'gezag' with the following data
    Given the response body equals
    """
    {
      "personen": [
        {
          "gezag": [
            {
              "type": "TweehoofdigOuderlijkGezag",
              "minderjarige": {
                "burgerservicenummer": "000000012"
              }
            },
            {
              "type": "GezamenlijkGezag",
              "minderjarige": {
                "burgerservicenummer": "000000013"
              }
            }
          ]
        }
      ]
    }
    """
    Then the response has a person with a 'gezag' with the following data
    | type                      | minderjarige.burgerservicenummer |
    | TweehoofdigOuderlijkGezag | 000000012                        |
    And the person has a 'gezag' with the following data
    | type             | minderjarige.burgerservicenummer |
    | GezamenlijkGezag | 000000013                        |

  Scenario: Then the 'gezag' has (another) 'ouder' with the following data
    Given the response body equals
    """
    {
      "personen": [
        {
          "gezag": [
            {
              "type": "TweehoofdigOuderlijkGezag",
              "minderjarige": {
                "burgerservicenummer": "000000012"
              },
              "ouders": [
                {
                  "burgerservicenummer": "000000024"
                },
                {
                  "burgerservicenummer": "000000048"
                }
              ]
            }
          ]
        }
      ]
    }
    """
    Then the response has a person with a 'gezag' with the following data
    | type                      | minderjarige.burgerservicenummer |
    | TweehoofdigOuderlijkGezag | 000000012                        |
    And 'gezag' has a 'ouder' with the following data
    | burgerservicenummer |
    | 000000024           |
    And the 'gezag' has another 'ouder' with the following data
    | burgerservicenummer |
    | 000000048           |

  Scenario: Then the 'gezag' has a 'derde' with the following data
    Given the response body equals
    """
    {
      "personen": [
        {
          "gezag": [
            {
              "type": "Voogdij",
              "minderjarige": {
                "burgerservicenummer": "000000012"
              },
              "derden": [
                {
                  "burgerservicenummer": "000000024"
                },
                {
                  "burgerservicenummer": "000000048"
                }
              ]
            }
          ]
        }
      ]
    }
    """
    Then the response has a person with a 'gezag' with the following data
    | type    | minderjarige.burgerservicenummer |
    | Voogdij | 000000012                        |
    And 'gezag' has a 'derde' with the following data
    | burgerservicenummer |
    | 000000024           |
    And 'gezag' has a 'derde' with the following data
    | burgerservicenummer |
    | 000000048           |

  Scenario: Then the response has a person without 'gezag' data
    Given the response body equals
    """
    {
      "personen": [
        {
          "gezag": []
        }
      ]
    }
    """
    Then the response has a person without authority

  Scenario: Then the person has no authority
    Given the response body equals
    """
    {
      "personen": [
        {
          "burgerservicenummer": "000000061",
          "gezag": []
        }
      ]
    }
    """
    Then the response has a person with the following data
    | burgerservicenummer|
    | 000000061 |
    And the person has no authority

  Scenario: Then the 'gezag' has no third parties
    Given the response body equals
    """
    {
      "personen": [
        {
          "gezag": [
            {
              "type": "Voogdij",
              "minderjarige": {
                "burgerservicenummer": "000000012"
              },
              "derden": []
            }
          ]
        }
      ]
    }
    """
    Then the response has a person with a 'gezag' with the following data
    | type    | minderjarige.burgerservicenummer |
    | Voogdij | 000000012                        |
    And the 'gezag' has no third parties