[dna-commits] DNA SVN: r107 - trunk/dna-common/src/test/java/org/jboss/dna/common.

dna-commits at lists.jboss.org dna-commits at lists.jboss.org
Thu Apr 24 09:48:43 EDT 2008


Author: rhauch
Date: 2008-04-24 09:48:43 -0400 (Thu, 24 Apr 2008)
New Revision: 107

Modified:
   trunk/dna-common/src/test/java/org/jboss/dna/common/AbstractI18nTest.java
Log:
Fixed a bad test case.

Modified: trunk/dna-common/src/test/java/org/jboss/dna/common/AbstractI18nTest.java
===================================================================
--- trunk/dna-common/src/test/java/org/jboss/dna/common/AbstractI18nTest.java	2008-04-24 01:42:52 UTC (rev 106)
+++ trunk/dna-common/src/test/java/org/jboss/dna/common/AbstractI18nTest.java	2008-04-24 13:48:43 UTC (rev 107)
@@ -17,36 +17,35 @@
 /**
  * @author John Verhaeg
  */
-public class AbstractI18nTest {
+public abstract class AbstractI18nTest {
 
-	private Class i18nClass;
+    private Class i18nClass;
 
-	protected AbstractI18nTest( Class i18nClass ) {
-		this.i18nClass = i18nClass;
-	}
+    protected AbstractI18nTest( Class i18nClass ) {
+        this.i18nClass = i18nClass;
+    }
 
-	@Test
-	@SuppressWarnings( "unchecked" )
-	public void shouldNotHaveLocalizationProblems() throws Exception {
-		Method method = i18nClass.getDeclaredMethod("getLocalizationProblemLocales", (Class[])null);
-		Set<Locale> locales = (Set<Locale>)method.invoke(null, (Object[])null);
-		method = i18nClass.getDeclaredMethod("getLocalizationProblems", Locale.class);
-		for (Locale locale : locales) {
-			assertThat(((Set<String>)method.invoke(null, locale)).isEmpty(), is(true));
-		}
-	}
+    @Test
+    @SuppressWarnings( "unchecked" )
+    public void shouldNotHaveLocalizationProblems() throws Exception {
+        Method method = i18nClass.getDeclaredMethod("getLocalizationProblemLocales", (Class[])null);
+        Set<Locale> locales = (Set<Locale>)method.invoke(null, (Object[])null);
+        method = i18nClass.getDeclaredMethod("getLocalizationProblems", Locale.class);
+        for (Locale locale : locales) {
+            assertThat(((Set<String>)method.invoke(null, locale)).isEmpty(), is(true));
+        }
+    }
 
-	@Test
-	public void shouldNotHaveProblems() throws IllegalAccessException {
-		for (Field fld : i18nClass.getDeclaredFields()) {
-			if (fld.getType() == I18n.class && (fld.getModifiers() & Modifier.PUBLIC) == Modifier.PUBLIC
-			    && (fld.getModifiers() & Modifier.STATIC) == Modifier.STATIC
-			    && (fld.getModifiers() & Modifier.FINAL) != Modifier.FINAL) {
-				I18n i18n = (I18n)fld.get(null);
-				if (i18n.hasProblem()) {
-					fail();
-				}
-			}
-		}
-	}
+    @Test
+    public void shouldNotHaveProblems() throws IllegalAccessException {
+        for (Field fld : i18nClass.getDeclaredFields()) {
+            if (fld.getType() == I18n.class && (fld.getModifiers() & Modifier.PUBLIC) == Modifier.PUBLIC && (fld.getModifiers() & Modifier.STATIC) == Modifier.STATIC
+                && (fld.getModifiers() & Modifier.FINAL) != Modifier.FINAL) {
+                I18n i18n = (I18n)fld.get(null);
+                if (i18n.hasProblem()) {
+                    fail();
+                }
+            }
+        }
+    }
 }




More information about the dna-commits mailing list