我想知道某些情况下的Gherkin语法。假设我有以下事件A,B {1},B {2},C,D1,D2,G。
其中大写{number}事件(例如B1,D2)是并行事件(同时发生)。
其中大写事件(如A,G)是正常事件。符号||
表示OR,而&&
表示AND。
现在,我如何为以下情况编写单元规格。
1. Arrange Event: P Act Event: Q Assert Event: C
2. Arrange Event: P Act Event: B1, B2, B3 Assert Event: C && D
3. Arrange Event: P || X || Y Act Event: B1, B2, B3 Assert Event: C || D
4. Arrange Event: P || X && Y Act Event: B1, B2, C Assert Event: D {C only happens after B1 and B2}
5. Arrange Event: P && X Act Event: B, C||D Assert Event: E {Either C or D have to happen one after another}
6. Arrange Event: P Act Event: B, C&&D Assert Event: E {{Both C and D have to happen one after another}
7. Arrange Event: P Act Event: B1||B2, C1&&C2, E Assert Event: F {Either of the event B1 or B2 happens simultaneously, afterward both C1 and C2 have to happen simulatenously}
8. Arrange Event: P Act Event: B1||B2, C&&D, E Assert Event: F {Either of the event B1 or B2 happens simultaneously, afterward, both C and D have to happen one after another}