Quantcast
Channel: BlogoSfera » something
Viewing all articles
Browse latest Browse all 26

Junit expect assertion called [duplicate]

$
0
0

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.


Viewing all articles
Browse latest Browse all 26

Trending Articles