Re: Loading global resources in test?

2007-08-22 Thread Erik Underbjerg
I figured it out. Guess I didn't read the documentation properly afterall. In the documentation for addStringResourceLoader is says: Description copied from interface: IResourceSettings Add a string resource loader to the chain of loaders. If this is the first call to this method sinc

Re: Loading global resources in test?

2007-08-21 Thread Igor Vaynberg
it looks like you are doing it properly. not sure why it doesnt work. you will have to debug it and see. maybe you have to do it every time because it might be creating new application instances? -igor On 8/21/07, Erik Underbjerg <[EMAIL PROTECTED]> wrote: > > Thanks for the reply. > > I did fig

Re: Loading global resources in test?

2007-08-21 Thread Erik Underbjerg
Thanks for the reply. I did figure out that the WicketTester is not a subclass of MyApplication, and therefore doesn't have access to the MyApplication.properties file. That's also why I was trying to do as you suggest, and add my own StringResourceLoader to the WicketTester subclass, and

Re: Loading global resources in test?

2007-08-21 Thread Igor Vaynberg
wicket tester uses a mock web application - not yours - so it cannot load those properties. i think in 1.3 we refactored it to support custom application subclasses. i think as far as you can make it work in 1.2.6 is to change resource settings not to throw exceptions on not-found-resources while t

Re: Loading global resources in test?

2007-08-20 Thread Erik Underbjerg
Right, sorry for the typo. I do have both: src/main/java/base/MyApplication.java src/main/java/base/MyApplication.properties The application works as intended: When I start MyApplication, I can access all constants in MyApplication.properties from various pages and components throughout the

Re: Loading global resources in test?

2007-08-20 Thread Igor Vaynberg
it should probably be MyApplication.properties unless you have myApplication.java -igor On 8/20/07, Erik Underbjerg <[EMAIL PROTECTED]> wrote: > > Hello, > > I have just moved some localized string resources to a > myApplication.properties file, because they need to accessed by > different p

Loading global resources in test?

2007-08-20 Thread Erik Underbjerg
Hello, I have just moved some localized string resources to a myApplication.properties file, because they need to accessed by different panels and pages, and it works fine. However, when running my unit tests with WicketTester, it can't find the resources in myApplication.properties. I ha