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
Currently JGiven requires to have intro words like and(), with(), but(), between step method calls e.g.:
given().flour()
.and().eggs()
.and().water();
If this is not given, the generated report looks somewhat strange. In addition, the intro words are sometimes not really needed/wanted. Instead one should be able to write:
given().flour()
.eggs()
.and().water();
The open question is now, how the report should look like. There are some possibilities:
Just left out the entry word:
Given flour
eggs
and water
Add a comma instead an intro word, but put the step on its own line
Given flour
, eggs
and water
Add a comma at the end of the previous step, but put the step on its own line
Given flour,
eggs
and water
Add a comma, but put the steps on one line:
Given flour, eggs
and water
The text was updated successfully, but these errors were encountered:
From a user perspective, I actually like the way it is now in the report. The reason is simple; from a logic and formal method perspective, it's concise and the formatting is also clear.
Now, on a related topic, I suppose the reason there is no or() in JGiven is basically because of the next challenge which is logical group(). Is this correct or it's on the roadmap?
Thanks for your opinion! However, in my opinion the current formatting in the report is not very nice. The above example would be printed as:
Given flour
eggs
and water
so eggs is aligned with Given.
To your second point: there is no or() in the Stage class, however, you can add arbitrary introduction methods to your stage classes if you want them. Just add a method like that:
@IntroWord
public SELF or() {
return self();
}
Regarding your 3rd point: there is a plan to be able to group steps. It is tracked by Issue #17, which I called Meta Steps.
Currently JGiven requires to have intro words like and(), with(), but(), between step method calls e.g.:
If this is not given, the generated report looks somewhat strange. In addition, the intro words are sometimes not really needed/wanted. Instead one should be able to write:
The open question is now, how the report should look like. There are some possibilities:
The text was updated successfully, but these errors were encountered: