[seam-commits] Seam SVN: r10723 - modules/trunk/international/src/test/java/org/jboss/seam/international.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Wed Apr 29 13:13:23 EDT 2009
Author: dan.j.allen
Date: 2009-04-29 13:13:23 -0400 (Wed, 29 Apr 2009)
New Revision: 10723
Removed:
modules/trunk/international/src/test/java/org/jboss/seam/international/LocaleProducerUnitTest.java
Modified:
modules/trunk/international/src/test/java/org/jboss/seam/international/LocaleProducerTest.java
Log:
unit test wasn't necessary
Modified: modules/trunk/international/src/test/java/org/jboss/seam/international/LocaleProducerTest.java
===================================================================
--- modules/trunk/international/src/test/java/org/jboss/seam/international/LocaleProducerTest.java 2009-04-29 16:34:16 UTC (rev 10722)
+++ modules/trunk/international/src/test/java/org/jboss/seam/international/LocaleProducerTest.java 2009-04-29 17:13:23 UTC (rev 10723)
@@ -9,8 +9,9 @@
import org.testng.annotations.Test;
/**
- * Ensure that the {@link LocaleProducer} returns the
- * default locale when the type {@link Locale} is resolved.
+ * Verify that the default {@link LocalProducer} returns the
+ * default locale of the JVM and is produced when {@link Locale}
+ * is resolved by JCDI.
*
* @author Dan Allen
*/
@@ -18,9 +19,26 @@
@Classes(LocaleProducer.class)
public class LocaleProducerTest extends AbstractWebBeansTest
{
+ /**
+ * Ensure that the producer method run in standalone
+ * mode produces the JVM default locale.
+ */
@Test
- public void testDefaultIsJvmDefault()
+ public void testProducerMethodReturnsJvmDefault()
{
+ LocaleProducer producer = new LocaleProducer();
+ Locale result = producer.getLocale();
+ assertNotNull(result);
+ assertEquals(result.toString(), Locale.getDefault().toString());
+ }
+
+ /**
+ * Ensure that the manager produces the JVM default locale
+ * for the type Locale.
+ */
+ @Test
+ public void testProducesJvmDefault()
+ {
Locale result = getCurrentManager().getInstanceByType(Locale.class);
assertEquals(result.toString(), Locale.getDefault().toString());
}
Deleted: modules/trunk/international/src/test/java/org/jboss/seam/international/LocaleProducerUnitTest.java
===================================================================
--- modules/trunk/international/src/test/java/org/jboss/seam/international/LocaleProducerUnitTest.java 2009-04-29 16:34:16 UTC (rev 10722)
+++ modules/trunk/international/src/test/java/org/jboss/seam/international/LocaleProducerUnitTest.java 2009-04-29 17:13:23 UTC (rev 10723)
@@ -1,23 +0,0 @@
-package org.jboss.seam.international;
-
-import java.util.Locale;
-import org.testng.annotations.Test;
-import static org.testng.Assert.*;
-
-/**
- * Verify that the default {@link LocalProducer} returns the
- * default locale of the JVM.
- *
- * @author Dan Allen
- */
-public class LocaleProducerUnitTest
-{
- @Test
- public void testLocaleIsJvmDefault()
- {
- LocaleProducer producer = new LocaleProducer();
- Locale result = producer.getLocale();
- assertNotNull(result);
- assertEquals(result.toString(), Locale.getDefault().toString());
- }
-}
More information about the seam-commits
mailing list