mockito throw exception on void method
В настоящее время я обновляю модульные тесты устаревшего проекта с Mockito v1 до Mockito v2. Throwing exceptions | Test-Driven Development with Mockito It gives you the option to handle this condition in different ways, depending on the situation. Dear Evil Tester '' contains advice about testing that you wo n't hear anywhere else the. The method when(T) in the type Mockito is not applicable for the arguments (void) I see that Mockito can’t mock a method that returns void. A Simple Static Utility Class. Mockito test a void method throws an exception Ask Question. More info and buy. void methods mockito-void-methods - Get docs Testing Void Method Using Mockito - vsubedi.wordpress.com … To configure the exception itself, we can pass the exception's class as in our previous examples or as an object: 5.
mockito throw exception on void method