Loading properties file in unit tests

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Loading properties file in unit tests

theAnthony
Hi,

I've created a custom form validator which uses a custom error message.
This error message is defined in a properties file having the same name as the application class "WicketApplication.properties" and being in the same package.

The file is well loaded when running the WicketApplication on a server, the file gets properly loaded :
10:49:09.101 [qtp23110255-18] INFO  o.a.w.resource.PropertiesFactory - Loading properties files from file:/C:/.../WicketApplication.properties

But it's unfortunately not loaded when running a unit test (in my case with TestNG).

Does anyone experienced the same thing and found out a solution ?

Thanks !
Reply | Threaded
Open this post in threaded view
|

Re: Loading properties file in unit tests

theAnthony
Hi folks,

I'm still stucked with this issue, I was wondering if any of you guys had an idea on how to fix this thing ?!

Thanks !
Reply | Threaded
Open this post in threaded view
|

Re: Loading properties file in unit tests

theAnthony
Really no idea ?