java - Adding Custom Messages to JUnit4 Style Exception Tests -
i have following test:
@test(expected=arithmeticexception.class) public void dividebyzero() { int n = 2 / 1; }
as seen here.
i add message print if test fails.
for instance if doing assertion test, following add message:
@test public void assertfail(){ assert.fail("this error message want printed."); assert.assertequals(true, false); }
the second example should print out "this error message want printed.". how set first example message text?
i don't think can easily, this guy seems have partially worked way around it.
Comments
Post a Comment