version: "1.0.0"
tests:
  "address_list.yaml#/$defs/AddressOneLine/properties/one_line_address":
    valid:
      '"Meine-Strasse 1, 76136 Anytown"':
      '"Meine-Strasse 1A, 76136 Anytown"':
      '"An der Henriette-Obermüller-Straße 127b, 76136 Karlsruhe"':
    invalid:
      Unexpected string after housenumber:
        payload: Meine-Strasse 1AX, 76136 Anytown
      Missing comma between street_and_housenumber and zip/city:
        payload: "Meine-Strasse 1 76136 Anytown"
      Comma used twice:
        payload: "Meine-Strasse, 1, 76136 Anytown"
      Missing street_and_housenumber part in one_line_address field:
        payload: "76136 Anytown"
  "address_list.yaml#/$defs/AddressOneLine":
    valid:
      basic_address:
        description: "Valid address with all required fields"
        payload:
          one_line_address: "Meine-Strasse 1, 76136 Anytown"
      complex_address:
        description: "Address with multiple words and non-ASCII characters in street_and_housenumber name"
        payload:
          one_line_address: "An der Henriette-Obermüller-Straße 127b, 76136 Anytown"
      additional property:
        payload:
          one_line_address: "Meine-Strasse 1, 76136 Anytown"
          hint: "Go left at the big tree"
    invalid:
      missing comma:
        description: "Missing comma between street_and_housenumber and zip/city"
        payload:
          one_line_address: "Meine-Strasse 1 76136 Anytown"
      comma used twice:
        description: "Comma used twice"
        payload:
          one_line_address: "Meine-Strasse, 1, 76136 Anytown"
      missing street_and_housenumber:
        description: "Missing street_and_housenumber part in one_line_address field"
        payload:
          one_line_address: "76136 Anytown"

  "address_list.yaml#/$defs/AddressTwoLines":
    valid:
      basic_address:
        description: "Valid address with all required fields"
        payload:
          street_and_housenumber: "Meine-Strasse 1"
          zip_and_city: "76136 Anytown"
      complex_address:
        description: "Address with multiple words and non-ASCII characters in street_and_housenumber name"
        payload:
          street_and_housenumber: "An der Henriette-Obermüller-Straße 127b"
          zip_and_city: "76136 Anytown"
      additional property:
        payload:
          street_and_housenumber: "Meine-Strasse 1"
          zip_and_city: "76136 Anytown"
          hint: "Go left after the ice cream shop"
    invalid:
      missing street_and_housenumber:
        description: "Missing street_and_housenumber field"
        payload:
          zip_and_city: "76136 Anytown"
      missing zip_and_city:
        description: "Missing zip_and_city field"
        payload:
          street_and_housenumber: "Meine-Strasse 1"

  "address_list.yaml#/$defs/AddressList":
    valid:
      single_one_line:
        description: "Single address in one_line format"
        payload:
          - one_line_address: "Meine-Strasse 1, 76136 Anytown"
      single_two_lines:
        description: "Single address in two_lines format"
        payload:
          - street_and_housenumber: "Meine-Strasse 1"
            zip_and_city: "76136 Anytown"
      mixed_addresses:
        description: "Multiple addresses in mixed formats"
        payload:
          - one_line_address: "Meine-Strasse 1, 76136 Anytown"
          - street_and_housenumber: "Meine-Strasse 1"
            zip_and_city: "76136 Anytown"
    invalid:
      empty_list:
        description: "Empty address list"
        payload: []
      invalid_entry_type:
        description: "List contains an entry of invalid type (string instead of object)"
        payload:
          - one_line_address: "Meine-Strasse 1, 76136 Anytown"
          - "Invalid entry"
      mixup:
        description: "List containing an object that seems to be both AddressOneLine and AddressTwoLines"
        payload:
          - one_line_address: "Meine-Strasse 1, 76136 Anytown"
            street_and_housenumber: "Meine-Strasse 1"
            zip_and_city: "76136 Anytown"
