-
Notifications
You must be signed in to change notification settings - Fork 99
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
In the report not only parameters appear in cases section but also a list parameter of a stage method #161
Comments
Yes, I agree that should not be the case. It is a bit related to #86. |
Thank you for your quick answers. Correct me if I am wrong but the difference between the two issues is :
|
Yes, I agree they are completely different. They only both have to do with the |
I reopend this issue, because the fix might actually be more difficult than I first expect. |
If you do not implement the equals method and create a different object in each case, than it is difficult for JGiven to find out whether the values are actually the same between each run. If they are not the same, however, JGiven has to create multiple cases for that. I will have to think about that issue a bit more, I guess :-) |
Ok I understand the point with equals method, we will do that, thank you. |
I fixed the issue now. It is not even necessary anymore to implement the equals method as JGiven takes the content of the table directly for comparison. |
In the report of this sample the discount periods (simple POJO object list) appear in cases section like that :
bdd.model.DiscountPeriod@45f45fa1, bdd.model.DiscountPeriod@4c6e276e
DiscountPeriod list is not a parameter of the test, so it seems strange that it appears in the report.
Give the report :
(with discountPeriods bdd.model.DiscountPeriod@45f45fa, bdd.model.DiscountPeriod@4c6e276)
If we override equals, hashCode or toString methods discountPeriods disappear of the cases section. .
The text was updated successfully, but these errors were encountered: