Hi.. In Fulcurm the class DefaultLocalizationService's initialize() method was automatically called by the unit test's resolve method: /** * Called the first time the Service is used. */ public void initialize() throws Exception { // initBundleNames(null); defaultLocale = new Locale(defaultLanguage, defaultCountry); Localization.setLocalizationService(this); if (log.isInfoEnabled()) { log.info("Localization Service is Initialized now.."); } }
Now however it fails, and I needed to add these two lines to get it to pass: LocalizationService ls = (LocalizationService) this.resolve( "/test/localization" ); ls.getString(null, new Locale("ko", "KR"), "key4"); Now passing unit test: public void testFacadeConfigured() throws Exception { // this.lookup causes the service to be configured. this.resolve( "/test/localization" ); LocalizationService ls = (LocalizationService) this.resolve( "/test/localization" ); ls.getString(null, new Locale("ko", "KR"), "key4"); assertTrue(Localization.isInitialized()); String s = Localization.getString(null, new Locale("ko", "KR"), "key4"); assertEquals( "Unable to retrieve localized text for locale: default", s, "value4"); } My challenge is that by just calling a this.resolve() the Facade Localization class should be populated.. At least I feel like that is enough. now, the inialize doens't get called until an actual method is called.. Is this pretty much the way thigns should work and my usecase is no longer valid? Eric --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]