Re: DI Through Constructors w/Wicket

2013-07-01 Thread William Speirs
There are a few of these libraries to make running Guice in JUnit easier, Onami is another: http://onami.apache.org/test/ However, if you have to add all of this extra stuff to your unit test, is it really worth it? Still struggling with all of this... but starting to hone in on my project's best

Re: DI Through Constructors w/Wicket

2013-07-01 Thread uwe schaefer
On 06/29/2013 03:13 PM, William Speirs wrote: I'm strongly leaning towards the best practice of: If you're having to create an injector in your unit test, then you're doing it wrong. maybe it makes it worse in your perspective, but yuo might want to have a look at jukito. https://code.googl

Re: DI Through Constructors w/Wicket

2013-07-01 Thread Martin Grigorov
Hi, On Sat, Jun 29, 2013 at 4:13 PM, William Speirs wrote: > I'm just getting to this now... weekend coder. > > @MartinGrigorov - this looks exactly like what I want, or parts of it > at least... I'll certainly check it out. And you're right, I shouldn't > be so skeptical, you Wicket folks seem

Re: DI Through Constructors w/Wicket

2013-06-30 Thread uwe schaefer
On 06/29/2013 03:13 PM, William Speirs wrote: Hi Bill, I'm strongly leaning towards the best practice of: If you're having to create an injector in your unit test, then you're doing it wrong. me too. well, normally. i came to the idea, that UI-Tests are not stricly unit-tests in most of the

Re: DI Through Constructors w/Wicket

2013-06-29 Thread William Speirs
I'm just getting to this now... weekend coder. @MartinGrigorov - this looks exactly like what I want, or parts of it at least... I'll certainly check it out. And you're right, I shouldn't be so skeptical, you Wicket folks seem to always come through with some library when I ask a question :-) @Da

Re: DI Through Constructors w/Wicket

2013-06-26 Thread Daniel Watrous
I worked out this process: http://software.danielwatrous.com/wicket-guice-including-unittests/ It enables unittests and may help you toward your goal. Daniel On Tue, Jun 25, 2013 at 7:14 PM, William Speirs wrote: > I think I know the answer before I ask, but is there any way to do > construct

Re: DI Through Constructors w/Wicket

2013-06-26 Thread Martin Grigorov
Hi, On Wed, Jun 26, 2013 at 4:14 AM, William Speirs wrote: > I think I know the answer before I ask, but is there any way to do > constructor injection with Wicket? Say I have a web page and an email > Don't be sceptic ;-) Here is some code that has been used with Wicket 1.4 - https://github.

DI Through Constructors w/Wicket

2013-06-25 Thread William Speirs
I think I know the answer before I ask, but is there any way to do constructor injection with Wicket? Say I have a web page and an email service. I need the email service in the web page. Now everyone is going to say, "Simply use field injection." That will work, but makes unit testing a real pain