You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
classStatefulTestextendsTestSuitewithState:setup:
-"an empty cart"Cart() as "myCart":-"another empty cart"Cart() as "anotherCart":where:
-tabular:
+*|"beachChair"|"sunScreen"|"total":-"quantity"|2|3|5:"price"|2|3|5:then:-sequentially:
-"add two items" using "myCart"'{_.add(CartItem("Beach chair", data["beachChair"]["quantity"]))}:-parallelly:
- ....
- ....
-sequentially:
- ....
- ....
-"add another three items"'{state["myCart"].add(CartItem("Sunscreen", data["sunScreen"]["quantity"]))}:expect:
-"contains 5 items"'{state["myCart"].totalQuantity == data["total"]["quantity"]} and:
-"costing" using "myCart"'{_.totalPrice == data["total"]["price"]}:lastly:
-"do some cleanup" using (_.close())
For table tests can they be specified like:
classMaxTestextendsTestSuitewithStateless:expect:
-"Max of a and b"'{ Math.max(data["a"], data["b"]) == data["c"] }
where:
-tabular:
+|"a"|"b"|"c":-|1|3|3:|7|4|7:|0|0|0:
The text was updated successfully, but these errors were encountered:
I believe the current DSL can be improved. E.g.:
For table tests can they be specified like:
The text was updated successfully, but these errors were encountered: