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

Reisdocument Then step definitions

#language: en

@stap-documentatie
Feature: Reisdocument Then step definitions

  Scenario: Then the response has 0 travel documents
    Given the response body equals
    """
    {
      "reisdocumenten": []
    }
    """
    Then the response has 0 travel documents

  Scenario: Then the response has 1 travel document
    Given the response body equals
    """
    {
      "reisdocumenten": [ {} ]
    }
    """
    Then the response has 1 travel document

  Scenario: Then the response has a travel document with the following data
    Given the response body equals
    """
    {
      "reisdocumenten": [
        {
          "reisdocumentnummer": "NE3663258"
        }
      ]
    }
    """
    Then the response has a travel document with the following data
    | naam               | waarde    |
    | reisdocumentnummer | NE3663258 |

  Scenario: Then the response has a travel document with the following data (several travel documents)
    Given the response body equals
    """
    {
      "reisdocumenten": [
        {
          "reisdocumentnummer": "NE3663258"
        },
        {
          "reisdocumentnummer": "ID82046A7",
          "soort": {
            "code": "PN"
          }
        }
      ]
    }
    """
    Then the response has a travel document with the following data
    | naam               | waarde    |
    | reisdocumentnummer | NE3663258 |
    And the response has a travel document with the following data
    | reisdocumentnummer | soort.code |
    | ID82046A7          | PN         |

  Scenario: Then the response has a travel document without data
    Given the response body equals
    """
    {
      "reisdocumenten": [
        {}
      ]
    }
    """
    Then the response has a travel document without data

  Scenario Outline: Then the response has a travel document with the following '[gegevensgroep]' data
    Given the response body equals
    """
    {
      "reisdocumenten": [
        {
          "soort": {
            "code": "PN"
          }
        }
      ]
    }
    """
    Then the response has a travel document with the following 'soort' data
    | naam | waarde |
    | code | PN     |

  Scenario: Then the travel document has the following '[gegevensgroep]' data
    Given the response body equals
    """
    {
      "reisdocumenten": [
        {
          "reisdocumentnummer": "NE3663258",
          "houder": {
            "opschortingBijhouding": {
              "reden": {
                "code": "O"
              }
            }
          }
        }
      ]
    }
    """
    Then the response has a travel document with the following data
    | reisdocumentnummer |
    | NE3663258          |
    And the travel document has the following 'houder' data
    | opschortingBijhouding.reden.code |
    | O                                |