Open GoogleCodeExporter opened 8 years ago
Yeah it might improved, the master has now some utility code that can gather
much more type information embedded in the class. Though it will require some
more work to make it work in the injection system and annotation based mocks.
However you are free to try for yourself. (https://github.com/mockito/mockito)
Cheers,
Brice
Original comment by brice.du...@gmail.com
on 2 Dec 2012 at 10:00
Ahh, I was not quite right. The problem will only occur if the test class looks
like this (i.e., only one Provider<?>-injection):
@RunWith(MockitoJUnitRunner.class)
public class MyClassTest {
@InjectMocks
private MyClass cut = new MyClass();
@Mock
private Provider<A> providerA;
...
}
With two Provider<?> mocks, the NameBasedCandidateFilter will take over.
Original comment by frank.sc...@gmail.com
on 2 Dec 2012 at 10:02
Yeah naming is important. Still your original idea is valid. That's definately
something that will be improved, but I don't really know when.
Original comment by brice.du...@gmail.com
on 2 Dec 2012 at 10:25
Original comment by brice.du...@gmail.com
on 4 Dec 2012 at 3:15
Original comment by brice.du...@gmail.com
on 4 Dec 2012 at 3:15
Original issue reported on code.google.com by
frank.sc...@gmail.com
on 2 Dec 2012 at 9:53