unit testing - Java JUnit test case with exceptions -
what's wrong this. have junit 4
you can declare on @test annotation that, test pass, must throw these exceptions:
@test(expected = nullpointerexception.class) public void testsynapseone() { // test } @test(expected = illegalstateexception.class) public void testsynapsetwo() { // test } of course, have sure you're testing right thing - currently, tests don't make use of constructor, critical piece want test.
oh - don't want have tests extend testcase unless need compatibility junit3.x.
Comments
Post a Comment