Well, yes, but it doesn’t invent an entire implementation for you that
returns null for everything, including things that can’t be.

Mock services is fine - because you still wind up writing mocks, you just
use that to plumb them into the default lookup. Different species of thing.

-Tim

On Tue, Oct 12, 2021 at 2:58 AM Jaroslav Tulach <jaroslav.tul...@gmail.com>
wrote:

> so 9. 10. 2021 v 19:27 odesílatel Karl-Philipp Richter <krich...@posteo.de
> >
> napsal:
>
> > Hi,
> > I wanted to contribute some unit tests to the project. As far I
> > understand there's no mocking framework in use currently looking
> >
>
> That's not  entirely true. There is `MockServices` class:
>
> https://bits.netbeans.org/dev/javadoc/org-netbeans-modules-nbjunit/org/netbeans/junit/MockServices.html
>
> It may not be as comfortable as Mockito & co., but it is enough to test
> everything as NetBeans architecture is based on "injectable singletons"
> pattern:
>
> http://wiki.apidesign.org/wiki/Injectable_Singleton
>
> -jt
>
-- 
http://timboudreau.com

Reply via email to