freepascal / mockito

Automatically exported from code.google.com/p/mockito
0 stars 0 forks source link

how to stub a void method such that no exception is thrown on calling the main method in some other class #43

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. test method xyz() of class A from class ATEST
2. stub a void method which is called within xyz()  
3.

What is the expected output? What do you see instead?
just return and do nothing

What version of the product are you using? On what operating system?

1.2
Please provide any additional information below.
stubVoid(mock).toThrow(new
NullPointerException()).on().getsomelist(resultslist);

Original issue reported on code.google.com by shweta...@gmail.com on 17 Dec 2008 at 7:14

GoogleCodeExporter commented 9 years ago
I wasn't able to recreate the problem. It is working fine, even though I've used
version 1.2. Please, attach your test or at least full body of test method. 

Do you actually invoke mock.getsomelist(resultslist)? It is throwing
NullPointerException for me.

Original comment by bbankow...@gmail.com on 17 Dec 2008 at 10:36

GoogleCodeExporter commented 9 years ago
Closing this one as no further details were given and problem can't be 
reproduced.

Original comment by bbankow...@gmail.com on 9 Jan 2009 at 3:54

GoogleCodeExporter commented 9 years ago

Original comment by szcze...@gmail.com on 14 Jan 2009 at 10:48