dhamini-poornachandra / mockito

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

enhance error message #388

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I would suggest changing:

Argument passed to verify() should be a mock but is null!
Examples of correct verifications:
    verify(mock).someMethod();
    verify(mock, times(10)).someMethod();
    verify(mock, atLeastOnce()).someMethod();

to:

Argument passed to verify() should be a mock but is null!
Examples of correct verifications:
    verify(mock).someMethod();
    verify(mock, times(10)).someMethod();
    verify(mock, atLeastOnce()).someMethod();
    not: verify(mock.someMethod())

ref: https://groups.google.com/forum/?fromgroups=#!topic/mockito/4Kbu4YDR780

Original issue reported on code.google.com by rogerpack2005 on 23 Oct 2012 at 8:47

GoogleCodeExporter commented 8 years ago
Hi,

Thx for the report, though `verify(mock.someMethod())` coud work if you are 
using a `RETURNS_DEEP_STUBS` answer.

Not sure that would be wise.

Original comment by brice.du...@gmail.com on 27 Nov 2012 at 5:03

GoogleCodeExporter commented 8 years ago

Original comment by brice.du...@gmail.com on 4 Dec 2013 at 3:10

GoogleCodeExporter commented 8 years ago

Original comment by szcze...@gmail.com on 16 Aug 2014 at 2:43

GoogleCodeExporter commented 8 years ago

Original comment by szcze...@gmail.com on 24 Aug 2014 at 3:14

GoogleCodeExporter commented 8 years ago

Original comment by szcze...@gmail.com on 24 Aug 2014 at 3:50