You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Hans-Heinrich Braun <ha...@yahoo.de.INVALID> on 2017/03/07 09:37:17 UTC
Mock Application.get()
I am storing the authenticated GoogleService in the Webapplication to use it in different components.Now i want to test it but Application is not Mockified. What do you recommend how to test my application with this service.
Re: Mock Application.get()
Posted by Martin Grigorov <mg...@apache.org>.
Hi,
There are several ways.
If you don't use dependency injection (Spring, CDI, Guice, ...) then I
guess the easiest would be to introduce a ServiceLocator facility.
Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov
On Tue, Mar 7, 2017 at 10:37 AM, Hans-Heinrich Braun <
hansheinrichbraun@yahoo.de.invalid> wrote:
> I am storing the authenticated GoogleService in the Webapplication to use
> it in different components.Now i want to test it but Application is not
> Mockified. What do you recommend how to test my application with this
> service.