# WARNING - DO NOT EDIT - YOUR CHANGES WILL NOT BE PROTECTED.
# This file is auto-generated by the aac gen-plugin and may be overwritten.

{% set comma_joiner = joiner(", ") %}
Feature: {{ name }}
{% if background %}Background: {{ background.name }}
{% for given in background.given %}{% if loop.index == 1 %}Given {{ background.given }}{% else %}And {{ background.given }}{% endif %}
{% endfor %}
{% endif %}
  {% for scenario in scenarios %}{% if scenario.tags | length > 0 %}{% for tag in scenario.tags %}@{{tag}} {% endfor %}{% endif %}{% if scenario.examples %}Scenario Outline: {{ scenario.name }}{% else %}Scenario: {{ scenario.name }}
  {% endif %}
      {% for given in scenario.given %}{% if loop.index == 1 %}Given {{ given }}{% else %}And {{ given }}{% endif %}
      {% endfor %}{% for when in scenario.when %}{% if loop.index == 1 %}When {{ when }}{% else %}And {{ when }}{% endif %}
      {% endfor %}{% for then in scenario.when %}{% if loop.index == 1 %}Then {{ then }}{% else %}And {{ then }}{% endif %}
      {% endfor %}
    {% if scenario.examples %}{% set comma_joiner = joiner("| ") %}
    Examples: {{ scenario.examples.name }}
       | {% for value in scenario.examples.values %}{{comma_joiner()}}{{value.name}}{% endfor %}
       {% for value in scenario.examples.values %}
       | {{comma_joiner()}}{{value.value}}
       {% endfor %}
    {% endif %}
  
  {% endfor %}