Is it possible to make some Junit tests that assertTrue (condition, throw some exeption) if condition was false

or if condition would throw something, say assertEquals (codition, new Excepption) ?

Recommended Answers

If you are looking to learn more about JUnit, go through these links that I hope will be useful for you.
Click Here

Jump to Post

All 3 Replies

Assert.assertTrue(true return of a function or a test or something else)

i never used JUint , i use eclipse debugger for most cases. You can also just have assert() statements at strategic locations in your code , and enable assertion when you want to test it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.