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

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 developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.