-
-
Notifications
You must be signed in to change notification settings - Fork 513
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
is there a way to model JUnit's Assume in Screenplay pattern? #2157
Comments
No, but it would be a good idea. |
There is something you can use already, http://thucydides.info/docs/articles/semantic-exceptions.html
while |
also.. shouldn't it be easy to write an interaction like |
Other option that I use, is the Facts, u can make a Fact about something and in case it doesn’t satisfy the rule, throw a compromised exception or use the Junit assume inside the setUp method of the fact. |
This seemed like the easiest solution, but I get:
I also tried |
@ricardorlg-aval I have never used |
Correction on my example:
|
That builds, but the test gets marked as Failed. I need it marked as Skipped. I ended up doing something like: |
Something like
actor.should(seeThat(actual, expected))
is essentially a JUnit Assert.Is there a way to model JUnit's Assume? That is: if the actual does not match the expected, the test is marked as Ignored, not Failed.
I thought
net.serenitybdd.screenplay.GivenWhenThen.seeIf()
might be it, but I am sure if this is the correct way forward. I am not able to find any examples of usingseeIf()
.The text was updated successfully, but these errors were encountered: