|
| 1 | +*** Settings *** |
| 2 | +Documentation This suite is an extension to the 'data fan out' suite, which needed refinement |
| 3 | +... for just a single step. Here, the high-level scenario needs refinement in three |
| 4 | +... of its steps. The background defines three actors and there are three refinement |
| 5 | +... scenarios available. One for each actor. However, the high-level scenario only |
| 6 | +... uses two of the actors, forcing the model to match up two of the steps and to |
| 7 | +... never use the third option. The test fails if the model does not properly keep |
| 8 | +... its data choices over all its steps when splitting the high-level scenario, and |
| 9 | +... picks data independently in each step. |
| 10 | +Suite Setup Treat this test suite Model-based |
| 11 | +Resource ../../resources/birthday_cards_data_variation.resource |
| 12 | +Library robotmbt |
| 13 | + |
| 14 | + |
| 15 | +*** Test Cases *** |
| 16 | +Background |
| 17 | + Given Bahar is having their birthday |
| 18 | + and Johan is a friend of Bahar |
| 19 | + and Tannaz is a friend of Bahar |
| 20 | + and Frederique is a friend of Bahar |
| 21 | + When Johan buys a birthday card |
| 22 | + then there is a blank birthday card available |
| 23 | + |
| 24 | +A friend signs the birthday card |
| 25 | + Given there is a birthday card |
| 26 | + when Johan signs the birthday card |
| 27 | + and Tannaz signs the birthday card |
| 28 | + and Johan signs the birthday card again |
| 29 | + then the birthday card has a personal touch |
| 30 | + and the birthday card has 2 different names written on it |
| 31 | + |
| 32 | +Signing the birthday card with your name only |
| 33 | + Given there is a birthday card |
| 34 | + and Johan is signing the birthday card |
| 35 | + when Johan writes their name on the birthday card |
| 36 | + then the birthday card has 'Johan' written on it |
| 37 | + |
| 38 | +Signing the birthday card with: Happy birthday! |
| 39 | + Given there is a birthday card |
| 40 | + and Tannaz is signing the birthday card |
| 41 | + when Tannaz writes their name on the birthday card |
| 42 | + and Tannaz adds the wish 'Happy birthday!' to the birthday card |
| 43 | + then the birthday card has 'Tannaz' written on it |
| 44 | + and the birthday card proclaims: Happy birthday! |
| 45 | + |
| 46 | +Signing the birthday card with: Cheers! |
| 47 | + Given there is a birthday card |
| 48 | + and Frederique is signing the birthday card |
| 49 | + when Frederique writes their name on the birthday card |
| 50 | + and Frederique adds the wish 'Cheers!' to the birthday card |
| 51 | + then the birthday card has 'Frederique' written on it |
| 52 | + and the birthday card proclaims: Cheers! |
| 53 | + |
| 54 | + |
| 55 | +*** Keywords *** |
| 56 | +${person} signs the birthday card again |
| 57 | + [Documentation] Similar to '${person} signs the birthday card', but |
| 58 | + ... without the check that the name is not already on there. |
| 59 | + ... |
| 60 | + ... *model info* |
| 61 | + ... :MOD: ${person}= [guest for guest in party.guests] |
| 62 | + ... :IN: scenario.guest = ${person} | scenario.count = len(birthday_card.names) |
| 63 | + ... :OUT: len(birthday_card.names) == scenario.count+1 |
| 64 | + Should contain ${names} ${person} |
0 commit comments