|
Feature: Multiple selectors |
|
|
|
Background: |
|
Given the username is "Matt" |
|
And the source is: |
|
""" |
|
match {$photoCount :number} {$userGender :equals} |
|
when 1 masculine {{$userName} added a new photo to his album.} |
|
when 1 feminine {{$userName} added a new photo to her album.} |
|
when 1 * {{$userName} added a new photo to their album.} |
|
when * masculine {{$userName} added {$photoCount} photos to his album.} |
|
when * feminine {{$userName} added {$photoCount} photos to her album.} |
|
when * * {{$userName} added {$photoCount} photos to their album.} |
|
""" |
|
|
|
Scenario: One item - male |
|
When the message is resolved with params: |
|
| key | value | |
|
| photoCount | 1 | |
|
| userGender | masculine | |
|
Then the string output is "Matt added a new photo to his album." |
|
|
|
Scenario: One item - female |
|
When the message is resolved with params: |
|
| key | value | |
|
| photoCount | 1 | |
|
| userGender | feminine | |
|
Then the string output is "Matt added a new photo to her album." |
|
|
|
Scenario: One item - other |
|
When the message is resolved with params: |
|
| key | value | |
|
| photoCount | 1 | |
|
| userGender | other | |
|
Then the string output is "Matt added a new photo to their album." |
|
|
|
Scenario: Multiple items - male |
|
When the message is resolved with params: |
|
| key | value | |
|
| photoCount | 2 | |
|
| userGender | masculine | |
|
Then the string output is "Matt added 2 photos to his album." |
|
|
|
Scenario: Multiple items - female |
|
When the message is resolved with params: |
|
| key | value | |
|
| photoCount | 2 | |
|
| userGender | feminine | |
|
Then the string output is "Matt added 2 photos to her album." |
|
|
|
Scenario: Multiple items - other |
|
When the message is resolved with params: |
|
| key | value | |
|
| photoCount | 2 | |
|
| userGender | other | |
|
Then the string output is "Matt added 2 photos to their album." |