This question already has an answer here: How do you assert that a certain exception is thrown in JUnit 4 tests? 18 answers In Junit is there a way to make sure the code makes it past a certain point? ex: @Test(expect = SpecialException.class) public void testMyCode() { essentialMethodThatCantBeMockedThatMayThrowSpecialException() // stuff actualMethodIAmTestingAndWillAlsoThrowSpecialException() } The main […]
The post Junit expect assertion called [duplicate] appeared first on BlogoSfera.