[seam-commits] Seam SVN: r13885 - in modules/international/trunk: api/src/main/java/org/jboss/seam/international and 9 other directories.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Fri Oct 15 16:23:51 EDT 2010
Author: kenfinni
Date: 2010-10-15 16:23:50 -0400 (Fri, 15 Oct 2010)
New Revision: 13885
Added:
modules/international/trunk/api/src/main/java/org/jboss/seam/international/locale/
modules/international/trunk/api/src/main/java/org/jboss/seam/international/locale/DefaultLocaleKeyConfig.java
modules/international/trunk/api/src/main/java/org/jboss/seam/international/locale/SupportedLocaleKeys.java
modules/international/trunk/api/src/main/java/org/jboss/seam/international/timezone/DefaultTimeZoneConfig.java
modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/locale/DefaultLocaleKeyBean.java
modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/locale/DefaultLocaleKeyFailBean.java
modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/locale/SupportedLocaleKeysBean.java
modules/international/trunk/impl/src/test/resources/org/jboss/seam/international/test/locale/default-locale.xml
modules/international/trunk/impl/src/test/resources/org/jboss/seam/international/test/timezone/user-timezone.xml
Removed:
modules/international/trunk/impl/src/test/resources/org/jboss/seam/international/test/locale/override-available.xml
modules/international/trunk/impl/src/test/resources/org/jboss/seam/international/test/locale/override-fail.xml
Modified:
modules/international/trunk/impl/pom.xml
modules/international/trunk/impl/src/main/java/org/jboss/seam/international/locale/AvailableLocales.java
modules/international/trunk/impl/src/main/java/org/jboss/seam/international/locale/DefaultLocaleProducer.java
modules/international/trunk/impl/src/main/java/org/jboss/seam/international/timezone/DefaultTimeZoneProducer.java
modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/locale/AvailableLocalesTest.java
modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/locale/DefaultLocaleOverrideFailTest.java
modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/locale/DefaultLocaleOverrideLangCountryTest.java
modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/locale/DefaultLocaleOverrideLangCountryVariantTest.java
modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/locale/DefaultLocaleOverrideLangTest.java
modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/locale/DefaultLocaleTest.java
modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/locale/UserLocaleTest.java
modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/timezone/DefaultTimeZoneOverrideFailTest.java
modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/timezone/DefaultTimeZoneOverrideTest.java
modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/timezone/DefaultTimeZoneTest.java
modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/timezone/UserTimeZoneTest.java
modules/international/trunk/impl/src/test/resources/org/jboss/seam/international/test/locale/override-lang-country-variant.xml
modules/international/trunk/impl/src/test/resources/org/jboss/seam/international/test/locale/override-lang-country.xml
modules/international/trunk/impl/src/test/resources/org/jboss/seam/international/test/locale/override-lang.xml
modules/international/trunk/impl/src/test/resources/org/jboss/seam/international/test/timezone/override-fail.xml
modules/international/trunk/impl/src/test/resources/org/jboss/seam/international/test/timezone/override.xml
modules/international/trunk/pom.xml
Log:
Update to Seam XML Alpha 3 and fix previously failing tests
Added: modules/international/trunk/api/src/main/java/org/jboss/seam/international/locale/DefaultLocaleKeyConfig.java
===================================================================
--- modules/international/trunk/api/src/main/java/org/jboss/seam/international/locale/DefaultLocaleKeyConfig.java (rev 0)
+++ modules/international/trunk/api/src/main/java/org/jboss/seam/international/locale/DefaultLocaleKeyConfig.java 2010-10-15 20:23:50 UTC (rev 13885)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.seam.international.locale;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+ at Target({METHOD, FIELD})
+ at Documented
+ at Retention(RUNTIME)
+ at Inherited
+/**
+ * Qualifier for specifying the default locale of an application.
+ *
+ * @author Ken Finnigan
+ */
+public @interface DefaultLocaleKeyConfig
+{
+
+}
Added: modules/international/trunk/api/src/main/java/org/jboss/seam/international/locale/SupportedLocaleKeys.java
===================================================================
--- modules/international/trunk/api/src/main/java/org/jboss/seam/international/locale/SupportedLocaleKeys.java (rev 0)
+++ modules/international/trunk/api/src/main/java/org/jboss/seam/international/locale/SupportedLocaleKeys.java 2010-10-15 20:23:50 UTC (rev 13885)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.seam.international.locale;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+ at Target({METHOD, FIELD})
+ at Documented
+ at Retention(RUNTIME)
+ at Inherited
+/**
+ * Qualifier for specifing a list of locales that the application will support.
+ *
+ * @author Ken Finnigan
+ */
+public @interface SupportedLocaleKeys
+{
+
+}
Added: modules/international/trunk/api/src/main/java/org/jboss/seam/international/timezone/DefaultTimeZoneConfig.java
===================================================================
--- modules/international/trunk/api/src/main/java/org/jboss/seam/international/timezone/DefaultTimeZoneConfig.java (rev 0)
+++ modules/international/trunk/api/src/main/java/org/jboss/seam/international/timezone/DefaultTimeZoneConfig.java 2010-10-15 20:23:50 UTC (rev 13885)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.seam.international.timezone;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+ at Target({METHOD, FIELD})
+ at Documented
+ at Retention(RUNTIME)
+ at Inherited
+/**
+ * Qualifier for specifying the id of a Default TimeZone for an application.
+ *
+ * @author Ken Finnigan
+ */
+public @interface DefaultTimeZoneConfig
+{
+
+}
Modified: modules/international/trunk/impl/pom.xml
===================================================================
--- modules/international/trunk/impl/pom.xml 2010-10-15 16:32:43 UTC (rev 13884)
+++ modules/international/trunk/impl/pom.xml 2010-10-15 20:23:50 UTC (rev 13885)
@@ -81,6 +81,14 @@
</dependency>
</dependencies>
+ <build>
+ <testResources>
+ <testResource>
+ <directory>src/test/resources</directory>
+ </testResource>
+ </testResources>
+ </build>
+
<profiles>
<profile>
<id>code-coverage</id>
Modified: modules/international/trunk/impl/src/main/java/org/jboss/seam/international/locale/AvailableLocales.java
===================================================================
--- modules/international/trunk/impl/src/main/java/org/jboss/seam/international/locale/AvailableLocales.java 2010-10-15 16:32:43 UTC (rev 13884)
+++ modules/international/trunk/impl/src/main/java/org/jboss/seam/international/locale/AvailableLocales.java 2010-10-15 20:23:50 UTC (rev 13885)
@@ -37,11 +37,13 @@
@ApplicationScoped
public class AvailableLocales
{
- private String[] supportedLocaleKeys;
-
@Inject
private Logger log;
+ @Inject
+ @SupportedLocaleKeys
+ private String[] supportedLocaleKeys;
+
@Produces
private List<Locale> locales = null;
@@ -50,17 +52,20 @@
{
locales = new ArrayList<Locale>();
- for (String localeKey : supportedLocaleKeys)
+ if (null != supportedLocaleKeys)
{
- try
+ for (String localeKey : supportedLocaleKeys)
{
- Locale lc = LocaleUtils.toLocale(localeKey);
- locales.add(lc);
+ try
+ {
+ Locale lc = LocaleUtils.toLocale(localeKey);
+ locales.add(lc);
+ }
+ catch (IllegalArgumentException e)
+ {
+ log.error("AvailableLocales: Supported Locale key of " + localeKey + " was not formatted correctly", e);
+ }
}
- catch (IllegalArgumentException e)
- {
- log.error("AvailableLocales: Supported Locale key of " + localeKey + " was not formatted correctly", e);
- }
}
Collections.sort(locales, new Comparator<Locale>()
Modified: modules/international/trunk/impl/src/main/java/org/jboss/seam/international/locale/DefaultLocaleProducer.java
===================================================================
--- modules/international/trunk/impl/src/main/java/org/jboss/seam/international/locale/DefaultLocaleProducer.java 2010-10-15 16:32:43 UTC (rev 13884)
+++ modules/international/trunk/impl/src/main/java/org/jboss/seam/international/locale/DefaultLocaleProducer.java 2010-10-15 20:23:50 UTC (rev 13885)
@@ -37,11 +37,13 @@
{
private static final long serialVersionUID = -4534087316489937649L;
- private String defaultLocaleKey;
-
@Inject
private Logger log;
+ @Inject
+ @DefaultLocaleKeyConfig
+ private String defaultLocaleKey;
+
@Produces
@Named
private Locale defaultLocale;
Modified: modules/international/trunk/impl/src/main/java/org/jboss/seam/international/timezone/DefaultTimeZoneProducer.java
===================================================================
--- modules/international/trunk/impl/src/main/java/org/jboss/seam/international/timezone/DefaultTimeZoneProducer.java 2010-10-15 16:32:43 UTC (rev 13884)
+++ modules/international/trunk/impl/src/main/java/org/jboss/seam/international/timezone/DefaultTimeZoneProducer.java 2010-10-15 20:23:50 UTC (rev 13885)
@@ -44,10 +44,12 @@
{
private static final long serialVersionUID = 6181892144731122500L;
+ @Inject
+ @DefaultTimeZoneConfig
private String defaultTimeZoneId;
@Inject
- Logger log;
+ private Logger log;
@Produces
@Named
Modified: modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/locale/AvailableLocalesTest.java
===================================================================
--- modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/locale/AvailableLocalesTest.java 2010-10-15 16:32:43 UTC (rev 13884)
+++ modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/locale/AvailableLocalesTest.java 2010-10-15 20:23:50 UTC (rev 13885)
@@ -27,35 +27,36 @@
import javax.inject.Inject;
import org.jboss.arquillian.api.Deployment;
+import org.jboss.arquillian.junit.Arquillian;
import org.jboss.seam.international.locale.AvailableLocales;
import org.jboss.shrinkwrap.api.ArchivePaths;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
+import org.jboss.shrinkwrap.impl.base.asset.ByteArrayAsset;
import org.junit.Assert;
import org.junit.Test;
+import org.junit.runner.RunWith;
-//@RunWith(Arquillian.class)
+ at RunWith(Arquillian.class)
public class AvailableLocalesTest
{
@Deployment
public static JavaArchive createTestArchive()
{
- return ShrinkWrap.create("test.jar", JavaArchive.class).addClasses(AvailableLocales.class).addManifestResource("org/jboss/seam/international/test/locale/override-available.xml", ArchivePaths.create("beans.xml"));
+ JavaArchive ja = ShrinkWrap.create("test.jar", JavaArchive.class)
+ .addClass(AvailableLocales.class)
+ .addClass(SupportedLocaleKeysBean.class)
+ .addManifestResource(new ByteArrayAsset(new byte[0]), ArchivePaths.create("beans.xml"));
+ return ja;
}
@Inject
List<Locale> locales;
- // FIXME XML Override not working
- // @Test
+ @Test
public void testAvailableLocalesProducer()
{
Assert.assertNotNull(locales);
Assert.assertEquals(2, locales.size());
}
-
- @Test
- public void testNothing()
- {
- }
}
Added: modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/locale/DefaultLocaleKeyBean.java
===================================================================
--- modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/locale/DefaultLocaleKeyBean.java (rev 0)
+++ modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/locale/DefaultLocaleKeyBean.java 2010-10-15 20:23:50 UTC (rev 13885)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.seam.international.test.locale;
+
+import javax.enterprise.inject.Produces;
+
+import org.jboss.seam.international.locale.DefaultLocaleKeyConfig;
+
+public class DefaultLocaleKeyBean
+{
+
+ @SuppressWarnings("unused")
+ @Produces
+ @DefaultLocaleKeyConfig
+ private String defaultLocaleKey = "en";
+}
Added: modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/locale/DefaultLocaleKeyFailBean.java
===================================================================
--- modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/locale/DefaultLocaleKeyFailBean.java (rev 0)
+++ modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/locale/DefaultLocaleKeyFailBean.java 2010-10-15 20:23:50 UTC (rev 13885)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.seam.international.test.locale;
+
+import javax.enterprise.inject.Produces;
+
+import org.jboss.seam.international.locale.DefaultLocaleKeyConfig;
+
+public class DefaultLocaleKeyFailBean
+{
+
+ @SuppressWarnings("unused")
+ @Produces
+ @DefaultLocaleKeyConfig
+ private String defaultLocaleKey = "z";
+}
Modified: modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/locale/DefaultLocaleOverrideFailTest.java
===================================================================
--- modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/locale/DefaultLocaleOverrideFailTest.java 2010-10-15 16:32:43 UTC (rev 13884)
+++ modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/locale/DefaultLocaleOverrideFailTest.java 2010-10-15 20:23:50 UTC (rev 13885)
@@ -42,7 +42,10 @@
@Deployment
public static JavaArchive createTestArchive()
{
- return ShrinkWrap.create("test.jar", JavaArchive.class).addClasses(DefaultLocaleProducer.class).addManifestResource(new ByteArrayAsset(new byte[0]), ArchivePaths.create("beans.xml")).addManifestResource("org/jboss/seam/international/test/locale/override-fail.xml", ArchivePaths.create("seam-beans.xml"));
+ return ShrinkWrap.create("test.jar", JavaArchive.class)
+ .addClass(DefaultLocaleProducer.class)
+ .addClass(DefaultLocaleKeyFailBean.class)
+ .addManifestResource(new ByteArrayAsset(new byte[0]), ArchivePaths.create("beans.xml"));
}
@Inject
Modified: modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/locale/DefaultLocaleOverrideLangCountryTest.java
===================================================================
--- modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/locale/DefaultLocaleOverrideLangCountryTest.java 2010-10-15 16:32:43 UTC (rev 13884)
+++ modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/locale/DefaultLocaleOverrideLangCountryTest.java 2010-10-15 20:23:50 UTC (rev 13885)
@@ -26,36 +26,35 @@
import javax.inject.Inject;
import org.jboss.arquillian.api.Deployment;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.seam.international.locale.DefaultLocaleKeyConfig;
import org.jboss.seam.international.locale.DefaultLocaleProducer;
import org.jboss.shrinkwrap.api.ArchivePaths;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
-import org.jboss.shrinkwrap.impl.base.asset.ByteArrayAsset;
import org.junit.Assert;
import org.junit.Test;
+import org.junit.runner.RunWith;
-//@RunWith(Arquillian.class)
+ at RunWith(Arquillian.class)
public class DefaultLocaleOverrideLangCountryTest
{
@Deployment
public static JavaArchive createTestArchive()
{
- return ShrinkWrap.create("test.jar", JavaArchive.class).addClasses(DefaultLocaleProducer.class).addManifestResource(new ByteArrayAsset(new byte[0]), ArchivePaths.create("beans.xml")).addManifestResource("org/jboss/seam/international/test/locale/override-lang-country.xml", ArchivePaths.create("seam-beans.xml"));
+ return ShrinkWrap.create("test.jar", JavaArchive.class)
+ .addClass(DefaultLocaleProducer.class)
+ .addClass(DefaultLocaleKeyConfig.class)
+ .addManifestResource("org/jboss/seam/international/test/locale/override-lang-country.xml", ArchivePaths.create("beans.xml"));
}
@Inject
Locale locale;
- // FIXME XML Override not working
- // @Test
+ @Test
public void testDefaultLocaleProducerDirect()
{
Assert.assertNotNull(locale);
Assert.assertEquals("en_US", locale.toString());
}
-
- @Test
- public void testNothing()
- {
- }
}
Modified: modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/locale/DefaultLocaleOverrideLangCountryVariantTest.java
===================================================================
--- modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/locale/DefaultLocaleOverrideLangCountryVariantTest.java 2010-10-15 16:32:43 UTC (rev 13884)
+++ modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/locale/DefaultLocaleOverrideLangCountryVariantTest.java 2010-10-15 20:23:50 UTC (rev 13885)
@@ -26,36 +26,31 @@
import javax.inject.Inject;
import org.jboss.arquillian.api.Deployment;
+import org.jboss.arquillian.junit.Arquillian;
import org.jboss.seam.international.locale.DefaultLocaleProducer;
import org.jboss.shrinkwrap.api.ArchivePaths;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
-import org.jboss.shrinkwrap.impl.base.asset.ByteArrayAsset;
import org.junit.Assert;
import org.junit.Test;
+import org.junit.runner.RunWith;
-//@RunWith(Arquillian.class)
+ at RunWith(Arquillian.class)
public class DefaultLocaleOverrideLangCountryVariantTest
{
@Deployment
public static JavaArchive createTestArchive()
{
- return ShrinkWrap.create("test.jar", JavaArchive.class).addClasses(DefaultLocaleProducer.class).addManifestResource(new ByteArrayAsset(new byte[0]), ArchivePaths.create("beans.xml")).addManifestResource("org/jboss/seam/international/test/locale/override-lang-country-variant.xml", ArchivePaths.create("seam-beans.xml"));
+ return ShrinkWrap.create("test.jar", JavaArchive.class).addClasses(DefaultLocaleProducer.class).addManifestResource("org/jboss/seam/international/test/locale/override-lang-country-variant.xml", ArchivePaths.create("beans.xml"));
}
@Inject
Locale locale;
- // FIXME XML Override not working
- // @Test
+ @Test
public void testDefaultLocaleProducerDirect()
{
Assert.assertNotNull(locale);
Assert.assertEquals("en_US_UNIX", locale.toString());
}
-
- @Test
- public void testNothing()
- {
- }
}
Modified: modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/locale/DefaultLocaleOverrideLangTest.java
===================================================================
--- modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/locale/DefaultLocaleOverrideLangTest.java 2010-10-15 16:32:43 UTC (rev 13884)
+++ modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/locale/DefaultLocaleOverrideLangTest.java 2010-10-15 20:23:50 UTC (rev 13885)
@@ -26,36 +26,31 @@
import javax.inject.Inject;
import org.jboss.arquillian.api.Deployment;
+import org.jboss.arquillian.junit.Arquillian;
import org.jboss.seam.international.locale.DefaultLocaleProducer;
import org.jboss.shrinkwrap.api.ArchivePaths;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
-import org.jboss.shrinkwrap.impl.base.asset.ByteArrayAsset;
import org.junit.Assert;
import org.junit.Test;
+import org.junit.runner.RunWith;
-//@RunWith(Arquillian.class)
+ at RunWith(Arquillian.class)
public class DefaultLocaleOverrideLangTest
{
@Deployment
public static JavaArchive createTestArchive()
{
- return ShrinkWrap.create("test.jar", JavaArchive.class).addClasses(DefaultLocaleProducer.class).addManifestResource(new ByteArrayAsset(new byte[0]), ArchivePaths.create("beans.xml")).addManifestResource("org/jboss/seam/international/test/locale/override-lang.xml", ArchivePaths.create("seam-beans.xml"));
+ return ShrinkWrap.create("test.jar", JavaArchive.class).addClasses(DefaultLocaleProducer.class).addManifestResource("org/jboss/seam/international/test/locale/override-lang.xml", ArchivePaths.create("beans.xml"));
}
@Inject
Locale locale;
- // FIXME XML Override not working
- // @Test
+ @Test
public void testDefaultLocaleProducerDirect()
{
Assert.assertNotNull(locale);
Assert.assertEquals("fr", locale.toString());
}
-
- @Test
- public void testNothing()
- {
- }
}
Modified: modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/locale/DefaultLocaleTest.java
===================================================================
--- modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/locale/DefaultLocaleTest.java 2010-10-15 16:32:43 UTC (rev 13884)
+++ modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/locale/DefaultLocaleTest.java 2010-10-15 20:23:50 UTC (rev 13885)
@@ -42,7 +42,11 @@
@Deployment
public static JavaArchive createTestArchive()
{
- return ShrinkWrap.create("defaultlocaletest.jar", JavaArchive.class).addClasses(DefaultLocaleProducer.class).addManifestResource(new ByteArrayAsset(new byte[0]), ArchivePaths.create("beans.xml"));
+ JavaArchive ja = ShrinkWrap.create("defaultlocaletest.jar", JavaArchive.class)
+ .addClass(DefaultLocaleProducer.class)
+ .addClass(DefaultLocaleKeyBean.class)
+ .addManifestResource(new ByteArrayAsset(new byte[0]), ArchivePaths.create("beans.xml"));
+ return ja;
}
@Inject
Added: modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/locale/SupportedLocaleKeysBean.java
===================================================================
--- modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/locale/SupportedLocaleKeysBean.java (rev 0)
+++ modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/locale/SupportedLocaleKeysBean.java 2010-10-15 20:23:50 UTC (rev 13885)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.seam.international.test.locale;
+
+import javax.enterprise.inject.Produces;
+
+import org.jboss.seam.international.locale.SupportedLocaleKeys;
+
+public class SupportedLocaleKeysBean
+{
+
+ @SuppressWarnings("unused")
+ @Produces
+ @SupportedLocaleKeys
+ private String[] supportedLocaleKeys = {"en", "fr"};
+}
Modified: modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/locale/UserLocaleTest.java
===================================================================
--- modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/locale/UserLocaleTest.java 2010-10-15 16:32:43 UTC (rev 13884)
+++ modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/locale/UserLocaleTest.java 2010-10-15 20:23:50 UTC (rev 13885)
@@ -35,7 +35,6 @@
import org.jboss.shrinkwrap.api.ArchivePaths;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
-import org.jboss.shrinkwrap.impl.base.asset.ByteArrayAsset;
import org.jboss.weld.extensions.core.Client;
import org.junit.Assert;
import org.junit.Test;
@@ -47,7 +46,10 @@
@Deployment
public static JavaArchive createTestArchive()
{
- return ShrinkWrap.create("userlocaletest.jar", JavaArchive.class).addClasses(UserLocaleProducer.class, DefaultLocaleProducer.class).addManifestResource(new ByteArrayAsset(new byte[0]), ArchivePaths.create("beans.xml"));
+ return ShrinkWrap.create("userlocaletest.jar", JavaArchive.class)
+ .addClass(UserLocaleProducer.class)
+ .addClass(DefaultLocaleProducer.class)
+ .addManifestResource("org/jboss/seam/international/test/locale/default-locale.xml", ArchivePaths.create("beans.xml"));
}
@Inject
Modified: modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/timezone/DefaultTimeZoneOverrideFailTest.java
===================================================================
--- modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/timezone/DefaultTimeZoneOverrideFailTest.java 2010-10-15 16:32:43 UTC (rev 13884)
+++ modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/timezone/DefaultTimeZoneOverrideFailTest.java 2010-10-15 20:23:50 UTC (rev 13885)
@@ -24,6 +24,8 @@
import javax.inject.Inject;
import org.jboss.arquillian.api.Deployment;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.seam.international.timezone.DefaultTimeZoneConfig;
import org.jboss.seam.international.timezone.DefaultTimeZoneProducer;
import org.jboss.shrinkwrap.api.ArchivePaths;
import org.jboss.shrinkwrap.api.ShrinkWrap;
@@ -31,30 +33,28 @@
import org.joda.time.DateTimeZone;
import org.junit.Assert;
import org.junit.Test;
+import org.junit.runner.RunWith;
-//@RunWith(Arquillian.class)
+ at RunWith(Arquillian.class)
public class DefaultTimeZoneOverrideFailTest
{
@Deployment
public static JavaArchive createTestArchive()
{
- return ShrinkWrap.create("test.jar", JavaArchive.class).addClasses(DefaultTimeZoneProducer.class).addManifestResource("org/jboss/seam/international/test/timezone/override-fail.xml", ArchivePaths.create("beans.xml"));
+ return ShrinkWrap.create("test.jar", JavaArchive.class)
+ .addClass(DefaultTimeZoneProducer.class)
+ .addClass(DefaultTimeZoneConfig.class)
+ .addManifestResource("org/jboss/seam/international/test/timezone/override-fail.xml", ArchivePaths.create("beans.xml"));
}
@Inject
DateTimeZone timeZone;
- // FIXME XML override not working
- // @Test
+ @Test
public void testDefaultTimeZoneProducerDirect()
{
Assert.assertNotNull(timeZone);
Assert.assertNotSame("America/Tijuana", timeZone.getID());
Assert.assertEquals(DateTimeZone.getDefault().getID(), timeZone.getID());
}
-
- @Test
- public void testNothing()
- {
- }
}
Modified: modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/timezone/DefaultTimeZoneOverrideTest.java
===================================================================
--- modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/timezone/DefaultTimeZoneOverrideTest.java 2010-10-15 16:32:43 UTC (rev 13884)
+++ modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/timezone/DefaultTimeZoneOverrideTest.java 2010-10-15 20:23:50 UTC (rev 13885)
@@ -24,6 +24,7 @@
import javax.inject.Inject;
import org.jboss.arquillian.api.Deployment;
+import org.jboss.arquillian.junit.Arquillian;
import org.jboss.seam.international.timezone.DefaultTimeZoneProducer;
import org.jboss.shrinkwrap.api.ArchivePaths;
import org.jboss.shrinkwrap.api.ShrinkWrap;
@@ -31,8 +32,9 @@
import org.joda.time.DateTimeZone;
import org.junit.Assert;
import org.junit.Test;
+import org.junit.runner.RunWith;
-//@RunWith(Arquillian.class)
+ at RunWith(Arquillian.class)
public class DefaultTimeZoneOverrideTest
{
@Deployment
@@ -44,16 +46,10 @@
@Inject
DateTimeZone timeZone;
- // FIXME XML override not working
- // @Test
+ @Test
public void testDefaultTimeZoneProducerDirect()
{
Assert.assertNotNull(timeZone);
Assert.assertEquals("America/Tijuana", timeZone.getID());
}
-
- @Test
- public void testNothing()
- {
- }
}
Modified: modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/timezone/DefaultTimeZoneTest.java
===================================================================
--- modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/timezone/DefaultTimeZoneTest.java 2010-10-15 16:32:43 UTC (rev 13884)
+++ modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/timezone/DefaultTimeZoneTest.java 2010-10-15 20:23:50 UTC (rev 13885)
@@ -25,11 +25,11 @@
import org.jboss.arquillian.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.seam.international.timezone.DefaultTimeZoneConfig;
import org.jboss.seam.international.timezone.DefaultTimeZoneProducer;
import org.jboss.shrinkwrap.api.ArchivePaths;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
-import org.jboss.shrinkwrap.impl.base.asset.ByteArrayAsset;
import org.joda.time.DateTimeZone;
import org.junit.Assert;
import org.junit.Test;
@@ -41,7 +41,10 @@
@Deployment
public static JavaArchive createTestArchive()
{
- return ShrinkWrap.create("defaulttimezonetest.jar", JavaArchive.class).addClasses(DefaultTimeZoneProducer.class).addManifestResource(new ByteArrayAsset(new byte[0]), ArchivePaths.create("beans.xml"));
+ return ShrinkWrap.create("defaulttimezonetest.jar", JavaArchive.class)
+ .addClass(DefaultTimeZoneProducer.class)
+ .addClass(DefaultTimeZoneConfig.class)
+ .addManifestResource("org/jboss/seam/international/test/timezone/user-timezone.xml", ArchivePaths.create("beans.xml"));
}
@Inject
Modified: modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/timezone/UserTimeZoneTest.java
===================================================================
--- modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/timezone/UserTimeZoneTest.java 2010-10-15 16:32:43 UTC (rev 13884)
+++ modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/timezone/UserTimeZoneTest.java 2010-10-15 20:23:50 UTC (rev 13885)
@@ -28,12 +28,12 @@
import org.jboss.arquillian.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.seam.international.Changed;
+import org.jboss.seam.international.timezone.DefaultTimeZoneConfig;
import org.jboss.seam.international.timezone.DefaultTimeZoneProducer;
import org.jboss.seam.international.timezone.UserTimeZoneProducer;
import org.jboss.shrinkwrap.api.ArchivePaths;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
-import org.jboss.shrinkwrap.impl.base.asset.ByteArrayAsset;
import org.jboss.weld.extensions.core.Client;
import org.joda.time.DateTimeZone;
import org.junit.Assert;
@@ -46,7 +46,11 @@
@Deployment
public static JavaArchive createTestArchive()
{
- return ShrinkWrap.create("usertimezonetest.jar", JavaArchive.class).addClasses(UserTimeZoneProducer.class, DefaultTimeZoneProducer.class).addManifestResource(new ByteArrayAsset(new byte[0]), ArchivePaths.create("beans.xml"));
+ return ShrinkWrap.create("usertimezonetest.jar", JavaArchive.class)
+ .addClass(UserTimeZoneProducer.class)
+ .addClass(DefaultTimeZoneProducer.class)
+ .addClass(DefaultTimeZoneConfig.class)
+ .addManifestResource("org/jboss/seam/international/test/timezone/user-timezone.xml", ArchivePaths.create("beans.xml"));
}
@Inject
Added: modules/international/trunk/impl/src/test/resources/org/jboss/seam/international/test/locale/default-locale.xml
===================================================================
--- modules/international/trunk/impl/src/test/resources/org/jboss/seam/international/test/locale/default-locale.xml (rev 0)
+++ modules/international/trunk/impl/src/test/resources/org/jboss/seam/international/test/locale/default-locale.xml 2010-10-15 20:23:50 UTC (rev 13885)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="urn:java:ee"
+ xmlns:lc="urn:java:org.jboss.seam.international.locale">
+
+ <String>
+ <Produces/>
+ <lc:DefaultLocaleKeyConfig/>
+ <value>fr</value>
+ </String>
+
+</beans>
\ No newline at end of file
Deleted: modules/international/trunk/impl/src/test/resources/org/jboss/seam/international/test/locale/override-available.xml
===================================================================
--- modules/international/trunk/impl/src/test/resources/org/jboss/seam/international/test/locale/override-available.xml 2010-10-15 16:32:43 UTC (rev 13884)
+++ modules/international/trunk/impl/src/test/resources/org/jboss/seam/international/test/locale/override-available.xml 2010-10-15 20:23:50 UTC (rev 13885)
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc., and individual contributors
-by the @authors tag. See the copyright.txt in the distribution for a
-full listing of individual contributors.
-
-This is free software; you can redistribute it and/or modify it
-under the terms of the GNU Lesser General Public License as
-published by the Free Software Foundation; either version 2.1 of
-the License, or (at your option) any later version.
-
-This software is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this software; if not, write to the Free
-Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-02110-1301 USA, or see the FSF site: http://www.fsf.org.
--->
-<beans xmlns="urn:java:ee"
- xmlns:lc="urn:java:org.jboss.seam.international.locale">
-
- <lc:AvailableLocales>
- <specializes/>
- <lc:supportedLocaleKeys>
- <value>en</value>
- <value>fr</value>
- </lc:supportedLocaleKeys>
- </lc:AvailableLocales>
-</beans>
\ No newline at end of file
Deleted: modules/international/trunk/impl/src/test/resources/org/jboss/seam/international/test/locale/override-fail.xml
===================================================================
--- modules/international/trunk/impl/src/test/resources/org/jboss/seam/international/test/locale/override-fail.xml 2010-10-15 16:32:43 UTC (rev 13884)
+++ modules/international/trunk/impl/src/test/resources/org/jboss/seam/international/test/locale/override-fail.xml 2010-10-15 20:23:50 UTC (rev 13885)
@@ -1,34 +0,0 @@
-<!--
-JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc., and individual contributors
-by the @authors tag. See the copyright.txt in the distribution for a
-full listing of individual contributors.
-
-This is free software; you can redistribute it and/or modify it
-under the terms of the GNU Lesser General Public License as
-published by the Free Software Foundation; either version 2.1 of
-the License, or (at your option) any later version.
-
-This software is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this software; if not, write to the Free
-Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-02110-1301 USA, or see the FSF site: http://www.fsf.org.
--->
-<beans xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:s="urn:java:seam:core"
- xmlns:lc="urn:java:org.jboss.seam.international.locale"
- xsi:schemaLocation="
- http://java.sun.com/xml/ns/javaee
- http://docs.jboss.org/cdi/beans_1_0.xsd">
-
- <lc:DefaultLocaleProducer>
- <s:specializes/>
- <lc:defaultLocaleKey>z</lc:defaultLocaleKey>
- </lc:DefaultLocaleProducer>
-</beans>
\ No newline at end of file
Modified: modules/international/trunk/impl/src/test/resources/org/jboss/seam/international/test/locale/override-lang-country-variant.xml
===================================================================
--- modules/international/trunk/impl/src/test/resources/org/jboss/seam/international/test/locale/override-lang-country-variant.xml 2010-10-15 16:32:43 UTC (rev 13884)
+++ modules/international/trunk/impl/src/test/resources/org/jboss/seam/international/test/locale/override-lang-country-variant.xml 2010-10-15 20:23:50 UTC (rev 13885)
@@ -1,34 +1,10 @@
-<!--
-JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc., and individual contributors
-by the @authors tag. See the copyright.txt in the distribution for a
-full listing of individual contributors.
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="urn:java:ee"
+ xmlns:lc="urn:java:org.jboss.seam.international.locale">
-This is free software; you can redistribute it and/or modify it
-under the terms of the GNU Lesser General Public License as
-published by the Free Software Foundation; either version 2.1 of
-the License, or (at your option) any later version.
-
-This software is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this software; if not, write to the Free
-Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-02110-1301 USA, or see the FSF site: http://www.fsf.org.
--->
-<beans xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:s="urn:java:seam:core"
- xmlns:lc="urn:java:org.jboss.seam.international.locale"
- xsi:schemaLocation="
- http://java.sun.com/xml/ns/javaee
- http://docs.jboss.org/cdi/beans_1_0.xsd">
-
- <lc:DefaultLocaleProducer>
- <s:specializes/>
- <lc:defaultLocaleKey>en_US_UNIX</lc:defaultLocaleKey>
- </lc:DefaultLocaleProducer>
+ <String>
+ <Produces/>
+ <lc:DefaultLocaleKeyConfig/>
+ <value>en_US_UNIX</value>
+ </String>
</beans>
\ No newline at end of file
Modified: modules/international/trunk/impl/src/test/resources/org/jboss/seam/international/test/locale/override-lang-country.xml
===================================================================
--- modules/international/trunk/impl/src/test/resources/org/jboss/seam/international/test/locale/override-lang-country.xml 2010-10-15 16:32:43 UTC (rev 13884)
+++ modules/international/trunk/impl/src/test/resources/org/jboss/seam/international/test/locale/override-lang-country.xml 2010-10-15 20:23:50 UTC (rev 13885)
@@ -1,34 +1,10 @@
-<!--
-JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc., and individual contributors
-by the @authors tag. See the copyright.txt in the distribution for a
-full listing of individual contributors.
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="urn:java:ee"
+ xmlns:lc="urn:java:org.jboss.seam.international.locale">
-This is free software; you can redistribute it and/or modify it
-under the terms of the GNU Lesser General Public License as
-published by the Free Software Foundation; either version 2.1 of
-the License, or (at your option) any later version.
-
-This software is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this software; if not, write to the Free
-Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-02110-1301 USA, or see the FSF site: http://www.fsf.org.
--->
-<beans xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:s="urn:java:seam:core"
- xmlns:lc="urn:java:org.jboss.seam.international.locale"
- xsi:schemaLocation="
- http://java.sun.com/xml/ns/javaee
- http://docs.jboss.org/cdi/beans_1_0.xsd">
-
- <lc:DefaultLocaleProducer>
- <s:specializes/>
- <lc:defaultLocaleKey>en_US</lc:defaultLocaleKey>
- </lc:DefaultLocaleProducer>
+ <String>
+ <Produces/>
+ <lc:DefaultLocaleKeyConfig/>
+ <value>en_US</value>
+ </String>
</beans>
\ No newline at end of file
Modified: modules/international/trunk/impl/src/test/resources/org/jboss/seam/international/test/locale/override-lang.xml
===================================================================
--- modules/international/trunk/impl/src/test/resources/org/jboss/seam/international/test/locale/override-lang.xml 2010-10-15 16:32:43 UTC (rev 13884)
+++ modules/international/trunk/impl/src/test/resources/org/jboss/seam/international/test/locale/override-lang.xml 2010-10-15 20:23:50 UTC (rev 13885)
@@ -1,34 +1,10 @@
-<!--
-JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc., and individual contributors
-by the @authors tag. See the copyright.txt in the distribution for a
-full listing of individual contributors.
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="urn:java:ee"
+ xmlns:lc="urn:java:org.jboss.seam.international.locale">
-This is free software; you can redistribute it and/or modify it
-under the terms of the GNU Lesser General Public License as
-published by the Free Software Foundation; either version 2.1 of
-the License, or (at your option) any later version.
-
-This software is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this software; if not, write to the Free
-Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-02110-1301 USA, or see the FSF site: http://www.fsf.org.
--->
-<beans xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:s="urn:java:seam:core"
- xmlns:lc="urn:java:org.jboss.seam.international.locale"
- xsi:schemaLocation="
- http://java.sun.com/xml/ns/javaee
- http://docs.jboss.org/cdi/beans_1_0.xsd">
-
- <lc:DefaultLocaleProducer>
- <s:specializes/>
- <lc:defaultLocaleKey>fr</lc:defaultLocaleKey>
- </lc:DefaultLocaleProducer>
+ <String>
+ <Produces/>
+ <lc:DefaultLocaleKeyConfig/>
+ <value>fr</value>
+ </String>
</beans>
\ No newline at end of file
Modified: modules/international/trunk/impl/src/test/resources/org/jboss/seam/international/test/timezone/override-fail.xml
===================================================================
--- modules/international/trunk/impl/src/test/resources/org/jboss/seam/international/test/timezone/override-fail.xml 2010-10-15 16:32:43 UTC (rev 13884)
+++ modules/international/trunk/impl/src/test/resources/org/jboss/seam/international/test/timezone/override-fail.xml 2010-10-15 20:23:50 UTC (rev 13885)
@@ -1,34 +1,10 @@
-<!--
-JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc., and individual contributors
-by the @authors tag. See the copyright.txt in the distribution for a
-full listing of individual contributors.
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="urn:java:ee"
+ xmlns:tz="urn:java:org.jboss.seam.international.timezone">
-This is free software; you can redistribute it and/or modify it
-under the terms of the GNU Lesser General Public License as
-published by the Free Software Foundation; either version 2.1 of
-the License, or (at your option) any later version.
-
-This software is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this software; if not, write to the Free
-Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-02110-1301 USA, or see the FSF site: http://www.fsf.org.
--->
-<beans xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:s="urn:java:seam:core"
- xmlns:tz="urn:java:org.jboss.seam.international.timezone"
- xsi:schemaLocation="
- http://java.sun.com/xml/ns/javaee
- http://docs.jboss.org/cdi/beans_1_0.xsd">
-
- <tz:DefaultTimeZoneProducer>
- <s:specializes/>
- <tz:defaultTimeZoneId>America/Tijuanas</tz:defaultTimeZoneId>
- </tz:DefaultTimeZoneProducer>
+ <String>
+ <Produces/>
+ <tz:DefaultTimeZoneConfig/>
+ <value>America/Tijuanas</value>
+ </String>
</beans>
\ No newline at end of file
Modified: modules/international/trunk/impl/src/test/resources/org/jboss/seam/international/test/timezone/override.xml
===================================================================
--- modules/international/trunk/impl/src/test/resources/org/jboss/seam/international/test/timezone/override.xml 2010-10-15 16:32:43 UTC (rev 13884)
+++ modules/international/trunk/impl/src/test/resources/org/jboss/seam/international/test/timezone/override.xml 2010-10-15 20:23:50 UTC (rev 13885)
@@ -1,32 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!--
-JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc., and individual contributors
-by the @authors tag. See the copyright.txt in the distribution for a
-full listing of individual contributors.
-
-This is free software; you can redistribute it and/or modify it
-under the terms of the GNU Lesser General Public License as
-published by the Free Software Foundation; either version 2.1 of
-the License, or (at your option) any later version.
-
-This software is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this software; if not, write to the Free
-Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-02110-1301 USA, or see the FSF site: http://www.fsf.org.
--->
<beans xmlns="urn:java:ee"
xmlns:tz="urn:java:org.jboss.seam.international.timezone">
- <tz:DefaultTimeZoneProducer>
- <specializes/>
- <tz:defaultTimeZoneId>
- <value>America/Tijuana</value>
- </tz:defaultTimeZoneId>
- </tz:DefaultTimeZoneProducer>
+ <String>
+ <Produces/>
+ <tz:DefaultTimeZoneConfig/>
+ <value>America/Tijuana</value>
+ </String>
</beans>
\ No newline at end of file
Added: modules/international/trunk/impl/src/test/resources/org/jboss/seam/international/test/timezone/user-timezone.xml
===================================================================
--- modules/international/trunk/impl/src/test/resources/org/jboss/seam/international/test/timezone/user-timezone.xml (rev 0)
+++ modules/international/trunk/impl/src/test/resources/org/jboss/seam/international/test/timezone/user-timezone.xml 2010-10-15 20:23:50 UTC (rev 13885)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="urn:java:ee"
+ xmlns:tz="urn:java:org.jboss.seam.international.timezone">
+
+ <String>
+ <Produces/>
+ <tz:DefaultTimeZoneConfig/>
+ <value>America/NewYork</value>
+ </String>
+</beans>
\ No newline at end of file
Modified: modules/international/trunk/pom.xml
===================================================================
--- modules/international/trunk/pom.xml 2010-10-15 16:32:43 UTC (rev 13884)
+++ modules/international/trunk/pom.xml 2010-10-15 20:23:50 UTC (rev 13885)
@@ -32,6 +32,7 @@
<!-- Use snapshot WeldX -->
<weld.extensions.version>1.0.0.Beta1</weld.extensions.version>
<jboss-logging.version>3.0.0.Beta4</jboss-logging.version>
+ <seam-xml.version>3.0.0.Alpha3</seam-xml.version>
</properties>
<dependencyManagement>
@@ -53,9 +54,10 @@
</dependency>
<dependency>
- <groupId>org.jboss.seam.international</groupId>
- <artifactId>seam-international</artifactId>
- <version>${project.version}</version>
+ <groupId>org.jboss.seam.xml</groupId>
+ <artifactId>seam-xml-config</artifactId>
+ <version>${seam-xml.version}</version>
+ <scope>test</scope>
</dependency>
<dependency>
More information about the seam-commits
mailing list