I'm new to JUnit testing. I've tried using conditions, but it doesn't seem to work using assertEquals. For example, assertEquals(1 > 0, 10) which gives me a failed test. Is there another way of doing it? Thanks.
Asked
Active
Viewed 1,109 times
1 Answers
4
Use assertTrue, in your case: assertTrue(x > 0).
You can find all provided assertion-types here.

Moritz Groß
- 1,352
- 12
- 30