-3

When I invoke the functions method from a Test class, I want the executeSol method not to run because it causes me errors.

public String funciones(String arguments){ //Many operations . . . animalInterface.executeSol(integer id, String msg); <-- void return soluciones; } 
8
  • Can you elaborate what exactly you're trying to achieve? What should be the result? Commented Oct 22, 2018 at 18:53
  • No idea what do you want. Commented Oct 22, 2018 at 18:53
  • I have a void method into another method No you don't and no you cannot. Commented Oct 22, 2018 at 18:54
  • 2
    Please read minimal reproducible example and enhance your question accordingly. Commented Oct 22, 2018 at 18:54
  • sorry for my english. I will explain with steps: Commented Oct 22, 2018 at 20:06

1 Answer 1

0

Check out this link, https://gist.github.com/mariuszs/7489190 There is a great example on how to test for an exception. This was asked previously. Mockito How to mock and assert a thrown exception?

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.