Closed BMomani closed 1 year ago
There are 2 options available for assertTrue
public static void assertTrue(String message, boolean condition)
and
public static void assertTrue(boolean condition)
Why not use the first one instead of the second one? Providing a generic error message doesnt add much value here since there are only 2 values possible and if the condition fails it is very obvious that the value is not true and is false. If you prefer to see a proper error message which gives more context of the test, option 1 could be used.
@BMomani - Please let us know in case this option doesnt work for you for some reason.
This is a duplicate of #1030 which was closed.
@BMomani please review the discussion in that bug (particularly the comment from dsaff on Nov 18, 2014). If you still feel that we should change the behavior, please comment on that bug so all of the discussion is in one place.
I have this error message
and when going there I see I used assertTrue(whatever) the message should say expected true but that did not happen, or whatever better messages than just AssertionError and similar to other assert methods