Closed GoogleCodeExporter closed 8 years ago
Allow both options #1 and #2. Previously, only option #2 was permitted due to
validation checks.
//1
when(mock.foo()).thenReturn(mock(Foo.class));
//2
Foo foo = mock(Foo.class);
when(mock.foo()).thenReturn(foo);
Original comment by szcze...@gmail.com
on 31 Oct 2010 at 8:30
BTW. it's a well known code smell when mocks return mocks so don't get too
excited about this feature :)
Original comment by szcze...@gmail.com
on 31 Oct 2010 at 8:53
This issue was closed by revision 590e8eb051.
Original comment by szcze...@gmail.com
on 31 Oct 2010 at 8:55
Original comment by szcze...@gmail.com
on 3 Jul 2011 at 12:43
Original issue reported on code.google.com by
szcze...@gmail.com
on 24 May 2010 at 8:00