Re: Guice + Mockito

2018-06-08 Thread yu via google-guice
Thank you for the suggestion, I'll take a look at it. On Friday, June 8, 2018 at 12:53:14 AM UTC-7, David Nouls wrote: > > I had something similar implemented a few years ago. Indeed not difficult > to do. > > But I switched to Jukito because it offers a few advanced features: > - Interfaces and

Re: Guice + Mockito

2018-06-08 Thread David Nouls
I had something similar implemented a few years ago. Indeed not difficult to do. But I switched to Jukito because it offers a few advanced features: - Interfaces and abstract classes are automatically mocked (as a singleton). In many cases you don’t need to define any binding if you use

Re: Guice + Mockito

2018-06-08 Thread yu via google-guice
The problem seemed simple enough, so I didn't bother looking for an existing solution. It took less than a day and two iterations to get everything I needed into the custom library. Of course, it took a lot longer to make it look prettier. :) On Thursday, June 7, 2018 at 11:34:04 PM UTC-7,

Re: Guice + Mockito

2018-06-08 Thread David Nouls
Never tried Jukito ? works great. On 8 Jun 2018, 00:55 +0200, yu via google-guice , wrote: > 5 years late to the party. I ended up implementing my own library at my > current company:  > https://eng.collectivehealth.com/introducing-testmodule-bdab286f12db. > > On Monday, November 4, 2013 at

Re: Guice + Mockito

2018-06-07 Thread yu via google-guice
5 years late to the party. I ended up implementing my own library at my current company: https://eng.collectivehealth.com/introducing-testmodule-bdab286f12db. On Monday, November 4, 2013 at 8:09:29 AM UTC-8, Ari King wrote: > > How can I mock injected dependencies in JUnit tests? Thanks. > --

Guice + Mockito

2013-11-04 Thread Ari King
How can I mock injected dependencies in JUnit tests? Thanks. -- You received this message because you are subscribed to the Google Groups google-guice group. To unsubscribe from this group and stop receiving emails from it, send an email to google-guice+unsubscr...@googlegroups.com. To post to

Re: Guice + Mockito

2013-11-04 Thread Stephan Classen
see: https://groups.google.com/forum/#!topic/google-guice/NEkahqnpY4k On 11/04/2013 05:09 PM, Ari King wrote: How can I mock injected dependencies in JUnit tests? Thanks. -- You received this message because you are subscribed to the Google Groups google-guice group. To unsubscribe from this

Re: Guice + Mockito

2013-11-04 Thread Peter Reilly
I use constructor injection and the injected objects are mockito objects. To help things a little with using @Mock attributes I have a simple base test class: public class MockedTester { public MockedTester() { MockitoAnnotations.initMocks(this); } } public class

Re: Best JUnit/Guice/Mockito integration library?

2013-08-27 Thread Tim Boudreau
Here is a Guice-based test-runner I wrote and have been using for years in many projects: https://github.com/timboudreau/giulius-selenium-tests An example is probably worth two paragraphs of description: @RunWith(GuiceTest.class) public class MyTest { @TestWith(MyModule.class) public

Re: Best JUnit/Guice/Mockito integration library?

2013-08-10 Thread Vadim Bondarev
Please take a look on this project http://onami.apache.org/test/ On Aug 9, 2013, at 11:40 AM, Laszlo Ferenczi lferen...@gmail.com wrote: We ended up rolling our own, a simple JUnit runner implementation which creates the injector before every test. The modules are specified in an

Re: Best JUnit/Guice/Mockito integration library?

2013-08-09 Thread Laszlo Ferenczi
We ended up rolling our own, a simple JUnit runner implementation which creates the injector before every test. The modules are specified in an annotation on the class level in each test class. HTH -- L On Wed, Aug 7, 2013 at 10:52 PM, Nate Pendleton n8n8b...@gmail.com wrote: Jukito seemed

Re: Best JUnit/Guice/Mockito integration library?

2013-08-07 Thread Nate Pendleton
Jukito seemed quite nice, but I could not integrate it with Maven/Tycho. Something to be aware of. On Monday, February 21, 2011 7:52:17 AM UTC-8, Thomas Johnson wrote: What's the most matures/ library for combining Guice, JUnit, and Mockito for testing? I've seen guiceberry, Jukito, mycila,

Re: Best JUnit/Guice/Mockito integration library?

2011-02-21 Thread Esko Luontola
On Feb 21, 5:52 pm, Thomas Johnson thomas.j.john...@gmail.com wrote: What's the most matures/ library for combining Guice, JUnit, and Mockito for testing? All of those as-is. Constructing a Guice injector is only a couple of lines of code, so why would a library be needed for it? On the other

Re: Best JUnit/Guice/Mockito integration library?

2011-02-21 Thread Thomas Johnson
On Mon, Feb 21, 2011 at 12:20 PM, Esko Luontola esko.luont...@gmail.comwrote: On Feb 21, 5:52 pm, Thomas Johnson thomas.j.john...@gmail.com wrote: What's the most matures/ library for combining Guice, JUnit, and Mockito for testing? All of those as-is. Constructing a Guice injector is only

Re: Best JUnit/Guice/Mockito integration library?

2011-02-21 Thread Christian Goudreau
http://code.google.com/p/jukito/ Even depending on Guice or some other DI library in unit-level tests is a code smell. It's not about depending on Guice, it's about productivity. Any test could be written without the need for Guice, but it's more work. If you're using Guice at every level of