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

Reisdocument Given step definitions

#language: en

@stap-documentatie
Feature: Reisdocument Given step definitions

  Background:
    Given the 1st 'SELECT COALESCE(MAX(pl_id), 0)+1 FROM public.lo3_pl' statement has the result '9999'

  Scenario: the person with citizen service number '[bsn]' has a 'reisdocument' with the following data
    Given the person with citizen service number '000000012' has a 'reisdocument' with the following data
    | nummer reisdocument (35.20) |
    | NE3663258                   |
    Then the generated SQL statements are
    | stap | categorie      | text                                                                                                                                                  | values               |
    | 1    | inschrijving   | INSERT INTO public.lo3_pl(pl_id,mutatie_dt,geheim_ind) VALUES((SELECT COALESCE(MAX(pl_id), 0)+1 FROM public.lo3_pl),current_timestamp,$1) RETURNING * | 0                    |
    |      | persoon        | INSERT INTO public.lo3_pl_persoon(pl_id,stapel_nr,volg_nr,persoon_type,burger_service_nr) VALUES($1,$2,$3,$4,$5)                                      | 9999,0,0,P,000000012 |
    |      | reisdocument-1 | INSERT INTO public.lo3_pl_reis_doc(pl_id,stapel_nr,nl_reis_doc_nr) VALUES($1,$2,$3)                                                                   | 9999,0,NE3663258     |

  Scenario: the person has a 'reisdocument' with the following data
    Given the person with citizen service number '000000012' has the following data
    | naam                  | waarde |
    | geslachtsnaam (02.40) | Jansen |
    And the person has a 'reisdocument' with the following data
    | nummer reisdocument (35.20) |
    | NE3663258                   |
    Then the generated SQL statements are
    | stap | categorie      | text                                                                                                                                                  | values                      |
    | 1    | inschrijving   | INSERT INTO public.lo3_pl(pl_id,mutatie_dt,geheim_ind) VALUES((SELECT COALESCE(MAX(pl_id), 0)+1 FROM public.lo3_pl),current_timestamp,$1) RETURNING * | 0                           |
    |      | persoon        | INSERT INTO public.lo3_pl_persoon(pl_id,stapel_nr,volg_nr,persoon_type,burger_service_nr,geslachts_naam) VALUES($1,$2,$3,$4,$5,$6)                    | 9999,0,0,P,000000012,Jansen |
    |      | reisdocument-1 | INSERT INTO public.lo3_pl_reis_doc(pl_id,stapel_nr,nl_reis_doc_nr) VALUES($1,$2,$3)                                                                   | 9999,0,NE3663258            |