[cal10n-dev] branch, master, updated. v0.6-3-g6dbd268

added by portage for gitosis-gentoo git-noreply at pixie.qos.ch
Wed Sep 2 22:33:17 CEST 2009


The branch, master has been updated
       via  6dbd2687823a3cca73dc0427d31ce82b5a217b97 (commit)
      from  78f0bec7c34006d8db9796952102cee3ea0fe9f5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.qos.ch/gitweb/?p=cal10n.git;a=commit;h=6dbd2687823a3cca73dc0427d31ce82b5a217b97
http://github.com/ceki/cal10n/commit/6dbd2687823a3cca73dc0427d31ce82b5a217b97

commit 6dbd2687823a3cca73dc0427d31ce82b5a217b97
Author: Ceki Gulcu <ceki at qos.ch>
Date:   Wed Sep 2 22:30:46 2009 +0200

    - Reorganized various unit tests
    - testing reloading of resource file after change

diff --git a/cal10n-api/src/main/java/ch/qos/cal10n/util/CAL10NPropertyResourceBundle.java b/cal10n-api/src/main/java/ch/qos/cal10n/util/CAL10NPropertyResourceBundle.java
index fec35be..45aecaf 100644
--- a/cal10n-api/src/main/java/ch/qos/cal10n/util/CAL10NPropertyResourceBundle.java
+++ b/cal10n-api/src/main/java/ch/qos/cal10n/util/CAL10NPropertyResourceBundle.java
@@ -47,7 +47,7 @@ public class CAL10NPropertyResourceBundle extends PropertyResourceBundle {
   }
 
   public boolean hasChanged() {
-    //if the host file is unknown, no point in a check
+    // if the host file is unknown, no point in a check
     if (hostFile == null) {
       return false;
     }
@@ -65,4 +65,12 @@ public class CAL10NPropertyResourceBundle extends PropertyResourceBundle {
       }
     }
   }
+
+  /**
+   * WARNING: Used for testing purposes. Do not invoke directly in user code.
+   */
+  public void resetCheckTimes() {
+    nextCheck = 0;
+    lastModified = 0;
+  }
 }
diff --git a/cal10n-api/src/main/java/ch/qos/cal10n/util/StringToLocale.java b/cal10n-api/src/main/java/ch/qos/cal10n/util/MiscUtil.java
similarity index 77%
rename from cal10n-api/src/main/java/ch/qos/cal10n/util/StringToLocale.java
rename to cal10n-api/src/main/java/ch/qos/cal10n/util/MiscUtil.java
index 1e70cf8..6f5489d 100644
--- a/cal10n-api/src/main/java/ch/qos/cal10n/util/StringToLocale.java
+++ b/cal10n-api/src/main/java/ch/qos/cal10n/util/MiscUtil.java
@@ -21,9 +21,11 @@
  */
 package ch.qos.cal10n.util;
 
+import java.io.File;
+import java.net.URL;
 import java.util.Locale;
 
-public class StringToLocale {
+public class MiscUtil {
 
   public static Locale toLocale(String localeName) {
     if (localeName == null) {
@@ -36,4 +38,20 @@ public class StringToLocale {
       return new Locale(localeName);
     }
   }
+  
+  public static File urlToFile(URL url) {
+    if(url.getProtocol() != "file") {
+      return null;
+    }
+    String path = url.getPath();
+    if(path == null)
+      return null;
+    File candidate = new File(path);
+    if(candidate.exists()) {
+      return candidate;
+    } else {
+     return null;
+    }
+  }
+  
 }
diff --git a/cal10n-api/src/main/java/ch/qos/cal10n/util/PropertyResourceBundleFinder.java b/cal10n-api/src/main/java/ch/qos/cal10n/util/PropertyResourceBundleFinder.java
index 6b102f4..9d4c094 100644
--- a/cal10n-api/src/main/java/ch/qos/cal10n/util/PropertyResourceBundleFinder.java
+++ b/cal10n-api/src/main/java/ch/qos/cal10n/util/PropertyResourceBundleFinder.java
@@ -21,7 +21,6 @@
  */
 package ch.qos.cal10n.util;
 
-import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.URL;
@@ -70,7 +69,7 @@ public class PropertyResourceBundleFinder {
     if (url != null) {
       try {
         InputStream in = openConnectionForUrl(url);
-        prb = new CAL10NPropertyResourceBundle(in, urlToFile(url));
+        prb = new CAL10NPropertyResourceBundle(in, MiscUtil.urlToFile(url));
         in.close();
       } catch (IOException e) {
       }
@@ -78,21 +77,6 @@ public class PropertyResourceBundleFinder {
     return prb;
   }
 
-  static File urlToFile(URL url) {
-    if(url.getProtocol() != "file") {
-      return null;
-    }
-    String path = url.getPath();
-    if(path == null)
-      return null;
-    File candidate = new File(path);
-    if(candidate.exists()) {
-      return candidate;
-    } else {
-     return null;
-    }
-  }
-  
   private static String computeLanguageAndCountryCandidate(String baseName,
       Locale locale) {
     String language = locale.getLanguage();
diff --git a/cal10n-api/src/main/java/ch/qos/cal10n/verifier/MessageKeyVerifier.java b/cal10n-api/src/main/java/ch/qos/cal10n/verifier/MessageKeyVerifier.java
index 8b78912..c72e09d 100644
--- a/cal10n-api/src/main/java/ch/qos/cal10n/verifier/MessageKeyVerifier.java
+++ b/cal10n-api/src/main/java/ch/qos/cal10n/verifier/MessageKeyVerifier.java
@@ -32,7 +32,7 @@ import java.util.Set;
 
 import ch.qos.cal10n.util.AnnotationExtractor;
 import ch.qos.cal10n.util.PropertyResourceBundleFinder;
-import ch.qos.cal10n.util.StringToLocale;
+import ch.qos.cal10n.util.MiscUtil;
 import ch.qos.cal10n.verifier.Cal10nError.ErrorType;
 
 /**
@@ -157,7 +157,7 @@ public class MessageKeyVerifier implements IMessageKeyVerifier {
       throw new IllegalStateException(errMsg);
     }
     for (String localeName : localeNameArray) {
-      Locale locale = StringToLocale.toLocale(localeName);
+      Locale locale = MiscUtil.toLocale(localeName);
       System.out.println(locale);
       List<Cal10nError> tmpList = verify(locale);
       errorList.addAll(tmpList);
diff --git a/cal10n-api/src/test/java/ch/qos/cal10n/AllCal10nTest.java b/cal10n-api/src/test/java/ch/qos/cal10n/AllCal10nTest.java
index 4a9a34e..bd250d5 100644
--- a/cal10n-api/src/test/java/ch/qos/cal10n/AllCal10nTest.java
+++ b/cal10n-api/src/test/java/ch/qos/cal10n/AllCal10nTest.java
@@ -25,10 +25,11 @@ package ch.qos.cal10n;
 import org.junit.runner.RunWith;
 import org.junit.runners.Suite;
 import org.junit.runners.Suite.SuiteClasses;
- 
+
 @RunWith(Suite.class)
- at SuiteClasses({ch.qos.cal10n.util.PackageTest.class,
-  ch.qos.cal10n.sample.PackageTest.class})
+ at SuiteClasses( { ch.qos.cal10n.PackageTest.class,
+    ch.qos.cal10n.util.PackageTest.class,
+    ch.qos.cal10n.verifier.PackageTest.class })
 public class AllCal10nTest {
 
 }
diff --git a/cal10n-api/src/test/java/ch/qos/cal10n/sample/MessageConveyorPerftest.java b/cal10n-api/src/test/java/ch/qos/cal10n/MessageConveyorPerftest.java
similarity index 91%
copy from cal10n-api/src/test/java/ch/qos/cal10n/sample/MessageConveyorPerftest.java
copy to cal10n-api/src/test/java/ch/qos/cal10n/MessageConveyorPerftest.java
index 537b798..163067c 100644
--- a/cal10n-api/src/test/java/ch/qos/cal10n/sample/MessageConveyorPerftest.java
+++ b/cal10n-api/src/test/java/ch/qos/cal10n/MessageConveyorPerftest.java
@@ -19,15 +19,14 @@
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  * SOFTWARE.
  */
-package ch.qos.cal10n.sample;
+package ch.qos.cal10n;
 
 import java.util.Locale;
 
 import org.junit.Ignore;
 import org.junit.Test;
 
-import ch.qos.cal10n.IMessageConveyor;
-import ch.qos.cal10n.MessageConveyor;
+import ch.qos.cal10n.sample.Colors;
 
 // with caching ~300 nanos per translation
 // without caching 149'963 nanos or 149 micros per translation
diff --git a/cal10n-api/src/test/java/ch/qos/cal10n/MessageConveyorReloadTest.java b/cal10n-api/src/test/java/ch/qos/cal10n/MessageConveyorReloadTest.java
new file mode 100644
index 0000000..8c6c818
--- /dev/null
+++ b/cal10n-api/src/test/java/ch/qos/cal10n/MessageConveyorReloadTest.java
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2009 QOS.ch All rights reserved.
+ * 
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS  IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+package ch.qos.cal10n;
+
+import static org.junit.Assert.*;
+import static org.junit.Assert.assertNotNull;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+import java.util.Locale;
+import java.util.ResourceBundle;
+
+import org.junit.Test;
+
+import ch.qos.cal10n.sample.Colors;
+import ch.qos.cal10n.util.CAL10NPropertyResourceBundle;
+import ch.qos.cal10n.util.MiscUtil;
+
+public class MessageConveyorReloadTest {
+
+  
+  
+  
+  @Test
+  public void bundleReload() throws IOException, InterruptedException {
+    ClassLoader classLoader = this.getClass().getClassLoader();
+    String resourceCandidate =  "colors" + "_" + "en" + ".properties";
+    URL url = classLoader.getResource(resourceCandidate);
+    assertNotNull("the problem is in this test, not the code tested", url);
+
+    MessageConveyor mc = new MessageConveyor(new Locale("en"));
+    
+    mc.getMessage(Colors.BLUE);
+    
+    CAL10NPropertyResourceBundle initalRB = mc.cache.get(Colors.BLUE.getDeclaringClass().getName());
+    initalRB.resetCheckTimes();
+    File file =  MiscUtil.urlToFile(url);
+    file.setLastModified(System.currentTimeMillis()+60*60*1000);
+    mc.getMessage(Colors.BLUE);
+    ResourceBundle other = mc.cache.get(Colors.BLUE.getDeclaringClass().getName());
+    assertTrue(initalRB != other);
+  }
+}
diff --git a/cal10n-api/src/test/java/ch/qos/cal10n/sample/MessageConveyorTest.java b/cal10n-api/src/test/java/ch/qos/cal10n/MessageConveyorTest.java
similarity index 79%
rename from cal10n-api/src/test/java/ch/qos/cal10n/sample/MessageConveyorTest.java
rename to cal10n-api/src/test/java/ch/qos/cal10n/MessageConveyorTest.java
index 6d8e987..0f1c026 100644
--- a/cal10n-api/src/test/java/ch/qos/cal10n/sample/MessageConveyorTest.java
+++ b/cal10n-api/src/test/java/ch/qos/cal10n/MessageConveyorTest.java
@@ -20,19 +20,23 @@
  * SOFTWARE.
  */
 
-package ch.qos.cal10n.sample;
+package ch.qos.cal10n;
 
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.fail;
 
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.net.URL;
 import java.util.Locale;
 
 import org.junit.Test;
 
-import ch.qos.cal10n.MessageConveyor;
-import ch.qos.cal10n.MessageConveyorException;
-import ch.qos.cal10n.MessageParameterObj;
+import ch.qos.cal10n.sample.Colors;
 import ch.qos.cal10n.sample.Host.OtherColors;
+import ch.qos.cal10n.util.MiscUtil;
 
 public class MessageConveyorTest {
 
@@ -106,4 +110,16 @@ public class MessageConveyorTest {
           e.getMessage());
     }
   }
+  
+  @Test
+  public void bundleReload() throws IOException {
+    ClassLoader classLoader = this.getClass().getClassLoader();
+    String resourceCandidate =  "colors" + "_" + "en" + ".properties";
+    URL url = classLoader.getResource(resourceCandidate);
+    assertNotNull("the problem is in this test, not the code tested", url);
+
+    File file =  MiscUtil.urlToFile(url);
+    FileOutputStream fos = new FileOutputStream(file, true);
+    assertNotNull(file);
+  }
 }
diff --git a/cal10n-api/src/test/java/ch/qos/cal10n/sample/PackageTest.java b/cal10n-api/src/test/java/ch/qos/cal10n/PackageTest.java
similarity index 85%
rename from cal10n-api/src/test/java/ch/qos/cal10n/sample/PackageTest.java
rename to cal10n-api/src/test/java/ch/qos/cal10n/PackageTest.java
index ca1f4e2..739a19e 100644
--- a/cal10n-api/src/test/java/ch/qos/cal10n/sample/PackageTest.java
+++ b/cal10n-api/src/test/java/ch/qos/cal10n/PackageTest.java
@@ -20,14 +20,13 @@
  * SOFTWARE.
  */
 
-package ch.qos.cal10n.sample;
+package ch.qos.cal10n;
 
 import org.junit.runner.RunWith;
 import org.junit.runners.Suite;
 import org.junit.runners.Suite.SuiteClasses;
 
 @RunWith(Suite.class)
- at SuiteClasses( { MessageKeyVerifierTest.class, MessageConveyorTest.class,
-    MyColorVerificationTest.class, MyAllInOneColorVerificationTest.class })
+ at SuiteClasses( { MessageConveyorTest.class })
 public class PackageTest {
 }
diff --git a/cal10n-api/src/test/java/ch/qos/cal10n/sample/Host.java b/cal10n-api/src/test/java/ch/qos/cal10n/sample/Host.java
index 47b7c5f..6d73380 100644
--- a/cal10n-api/src/test/java/ch/qos/cal10n/sample/Host.java
+++ b/cal10n-api/src/test/java/ch/qos/cal10n/sample/Host.java
@@ -5,7 +5,7 @@ import ch.qos.cal10n.BaseName;
 public class Host {
 
   @BaseName("colors")
-  enum OtherColors {
+  public enum OtherColors {
     RED {
       
     },
diff --git a/cal10n-api/src/test/java/ch/qos/cal10n/sample/MessageConveyorPerftest.java b/cal10n-api/src/test/java/ch/qos/cal10n/util/MiscUtilTest.java
similarity index 59%
rename from cal10n-api/src/test/java/ch/qos/cal10n/sample/MessageConveyorPerftest.java
rename to cal10n-api/src/test/java/ch/qos/cal10n/util/MiscUtilTest.java
index 537b798..a248c16 100644
--- a/cal10n-api/src/test/java/ch/qos/cal10n/sample/MessageConveyorPerftest.java
+++ b/cal10n-api/src/test/java/ch/qos/cal10n/util/MiscUtilTest.java
@@ -19,41 +19,35 @@
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  * SOFTWARE.
  */
-package ch.qos.cal10n.sample;
+package ch.qos.cal10n.util;
 
-import java.util.Locale;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
 
-import org.junit.Ignore;
-import org.junit.Test;
-
-import ch.qos.cal10n.IMessageConveyor;
-import ch.qos.cal10n.MessageConveyor;
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
 
-// with caching ~300 nanos per translation
-// without caching 149'963 nanos or 149 micros per translation
+import org.junit.Test;
 
-public class MessageConveyorPerftest {
 
-  static int RUN_LENGTH = 100 *1000;
-  public String s;
+public class MiscUtilTest {
   
-  double loop() {
-    long start = System.nanoTime();
- 
-    IMessageConveyor mc = new MessageConveyor(Locale.ENGLISH);
-    for(int i = 0; i < RUN_LENGTH; i++) {
-      s = mc.getMessage(Colors.BLUE);
-    }
-    long end = System.nanoTime();
-    return (end - start) * 1.0 / RUN_LENGTH;
+  @Test
+  public void urlToFile() {
+    ClassLoader classLoader = this.getClass().getClassLoader();
+    String resourceCandidate =  "colors" + "_" + "en" + ".properties";
+    URL url = classLoader.getResource(resourceCandidate);
+    assertNotNull("the problem is in this test, not the code tested", url);
+
+    File file =  MiscUtil.urlToFile(url);
+    assertNotNull(file);
   }
   
-  @Ignore
   @Test
-  public void perfTest() {
-    loop();
-    loop();
-    
-    System.out.println("avg = "+loop());
+  public void httpUrlToFile() throws MalformedURLException {
+    URL url = new URL("http://www.xyz.com");
+    File file =  MiscUtil.urlToFile(url);
+    assertNull(file);
   }
 }
diff --git a/cal10n-api/src/test/java/ch/qos/cal10n/util/PackageTest.java b/cal10n-api/src/test/java/ch/qos/cal10n/util/PackageTest.java
index fa5217e..857db24 100644
--- a/cal10n-api/src/test/java/ch/qos/cal10n/util/PackageTest.java
+++ b/cal10n-api/src/test/java/ch/qos/cal10n/util/PackageTest.java
@@ -27,6 +27,7 @@ import org.junit.runners.Suite;
 import org.junit.runners.Suite.SuiteClasses;
 
 @RunWith(Suite.class)
- at SuiteClasses( { AnnotationExtractorTest.class })
+ at SuiteClasses( { AnnotationExtractorTest.class, MiscUtilTest.class,
+ PropertyResourceBundleFinderTest.class })
 public class PackageTest {
 }
diff --git a/cal10n-api/src/test/java/ch/qos/cal10n/util/PropertyResourceBundleFinderTest.java b/cal10n-api/src/test/java/ch/qos/cal10n/util/PropertyResourceBundleFinderTest.java
index ab02b10..628f096 100644
--- a/cal10n-api/src/test/java/ch/qos/cal10n/util/PropertyResourceBundleFinderTest.java
+++ b/cal10n-api/src/test/java/ch/qos/cal10n/util/PropertyResourceBundleFinderTest.java
@@ -22,13 +22,8 @@
 package ch.qos.cal10n.util;
 
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
 
-import java.io.File;
 import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
 import java.util.Locale;
 import java.util.ResourceBundle;
 
@@ -66,21 +61,5 @@ public class PropertyResourceBundleFinderTest {
     assertEquals("A is the first letter of the alphabet", rb.getString("A"));
   }
   
-  @Test
-  public void urlToFile() {
-    ClassLoader classLoader = this.getClass().getClassLoader();
-    String resourceCandidate =  "colors" + "_" + "en" + ".properties";
-    URL url = classLoader.getResource(resourceCandidate);
-    assertNotNull("the problem is in this test, not the code tested", url);
 
-    File file =  PropertyResourceBundleFinder.urlToFile(url);
-    assertNotNull(file);
-  }
-  
-  @Test
-  public void httpUrlToFile() throws MalformedURLException {
-    URL url = new URL("http://www.xyz.com");
-    File file =  PropertyResourceBundleFinder.urlToFile(url);
-    assertNull(file);
-  }
 }
diff --git a/cal10n-api/src/test/java/ch/qos/cal10n/sample/MessageKeyVerifierTest.java b/cal10n-api/src/test/java/ch/qos/cal10n/verifier/MessageKeyVerifierTest.java
similarity index 90%
rename from cal10n-api/src/test/java/ch/qos/cal10n/sample/MessageKeyVerifierTest.java
rename to cal10n-api/src/test/java/ch/qos/cal10n/verifier/MessageKeyVerifierTest.java
index c0d67c5..13288bc 100644
--- a/cal10n-api/src/test/java/ch/qos/cal10n/sample/MessageKeyVerifierTest.java
+++ b/cal10n-api/src/test/java/ch/qos/cal10n/verifier/MessageKeyVerifierTest.java
@@ -20,7 +20,7 @@
  * SOFTWARE.
  */
 
-package ch.qos.cal10n.sample;
+package ch.qos.cal10n.verifier;
 
 import static org.junit.Assert.assertEquals;
 
@@ -29,9 +29,8 @@ import java.util.Locale;
 
 import org.junit.Test;
 
-import ch.qos.cal10n.verifier.Cal10nError;
-import ch.qos.cal10n.verifier.IMessageKeyVerifier;
-import ch.qos.cal10n.verifier.MessageKeyVerifier;
+import ch.qos.cal10n.sample.Colors;
+import ch.qos.cal10n.sample.Countries;
 
 /**
  * 
diff --git a/cal10n-api/src/test/java/ch/qos/cal10n/sample/MyAllInOneColorVerificationTest.java b/cal10n-api/src/test/java/ch/qos/cal10n/verifier/MyAllInOneColorVerificationTest.java
similarity index 87%
rename from cal10n-api/src/test/java/ch/qos/cal10n/sample/MyAllInOneColorVerificationTest.java
rename to cal10n-api/src/test/java/ch/qos/cal10n/verifier/MyAllInOneColorVerificationTest.java
index 5af05d3..680bf90 100644
--- a/cal10n-api/src/test/java/ch/qos/cal10n/sample/MyAllInOneColorVerificationTest.java
+++ b/cal10n-api/src/test/java/ch/qos/cal10n/verifier/MyAllInOneColorVerificationTest.java
@@ -19,7 +19,7 @@
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  * SOFTWARE.
  */
-package ch.qos.cal10n.sample;
+package ch.qos.cal10n.verifier;
 
 
 import static org.junit.Assert.assertEquals;
@@ -28,9 +28,7 @@ import java.util.List;
 
 import org.junit.Test;
 
-import ch.qos.cal10n.verifier.Cal10nError;
-import ch.qos.cal10n.verifier.IMessageKeyVerifier;
-import ch.qos.cal10n.verifier.MessageKeyVerifier;
+import ch.qos.cal10n.sample.Colors;
 
 /**
  * 
diff --git a/cal10n-api/src/test/java/ch/qos/cal10n/sample/MyColorVerificationTest.java b/cal10n-api/src/test/java/ch/qos/cal10n/verifier/MyColorVerificationTest.java
similarity index 88%
rename from cal10n-api/src/test/java/ch/qos/cal10n/sample/MyColorVerificationTest.java
rename to cal10n-api/src/test/java/ch/qos/cal10n/verifier/MyColorVerificationTest.java
index 1624fd4..b51ad51 100644
--- a/cal10n-api/src/test/java/ch/qos/cal10n/sample/MyColorVerificationTest.java
+++ b/cal10n-api/src/test/java/ch/qos/cal10n/verifier/MyColorVerificationTest.java
@@ -19,7 +19,7 @@
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  * SOFTWARE.
  */
-package ch.qos.cal10n.sample;
+package ch.qos.cal10n.verifier;
 
 
 import static org.junit.Assert.assertEquals;
@@ -29,9 +29,7 @@ import java.util.Locale;
 
 import org.junit.Test;
 
-import ch.qos.cal10n.verifier.Cal10nError;
-import ch.qos.cal10n.verifier.IMessageKeyVerifier;
-import ch.qos.cal10n.verifier.MessageKeyVerifier;
+import ch.qos.cal10n.sample.Colors;
 
 public class MyColorVerificationTest {
 
diff --git a/cal10n-api/src/test/java/ch/qos/cal10n/util/PackageTest.java b/cal10n-api/src/test/java/ch/qos/cal10n/verifier/PackageTest.java
similarity index 87%
copy from cal10n-api/src/test/java/ch/qos/cal10n/util/PackageTest.java
copy to cal10n-api/src/test/java/ch/qos/cal10n/verifier/PackageTest.java
index fa5217e..e07e691 100644
--- a/cal10n-api/src/test/java/ch/qos/cal10n/util/PackageTest.java
+++ b/cal10n-api/src/test/java/ch/qos/cal10n/verifier/PackageTest.java
@@ -20,13 +20,14 @@
  * SOFTWARE.
  */
 
-package ch.qos.cal10n.util;
+package ch.qos.cal10n.verifier;
 
 import org.junit.runner.RunWith;
 import org.junit.runners.Suite;
 import org.junit.runners.Suite.SuiteClasses;
 
 @RunWith(Suite.class)
- at SuiteClasses( { AnnotationExtractorTest.class })
+ at SuiteClasses( { MessageKeyVerifierTest.class, MyColorVerificationTest.class,
+    MyAllInOneColorVerificationTest.class })
 public class PackageTest {
 }

-----------------------------------------------------------------------

Summary of changes:
 .../cal10n/util/CAL10NPropertyResourceBundle.java  |   10 +++-
 .../util/{StringToLocale.java => MiscUtil.java}    |   20 ++++++-
 .../cal10n/util/PropertyResourceBundleFinder.java  |   18 +-----
 .../ch/qos/cal10n/verifier/MessageKeyVerifier.java |    4 +-
 .../src/test/java/ch/qos/cal10n/AllCal10nTest.java |    7 +-
 .../{sample => }/MessageConveyorPerftest.java      |    5 +-
 .../ch/qos/cal10n/MessageConveyorReloadTest.java   |   64 ++++++++++++++++++++
 .../cal10n/{sample => }/MessageConveyorTest.java   |   24 ++++++-
 .../ch/qos/cal10n/{sample => }/PackageTest.java    |    5 +-
 .../src/test/java/ch/qos/cal10n/sample/Host.java   |    2 +-
 ...otationExtractorTest.java => MiscUtilTest.java} |   34 ++++++-----
 .../test/java/ch/qos/cal10n/util/PackageTest.java  |    3 +-
 .../util/PropertyResourceBundleFinderTest.java     |   21 -------
 .../MessageKeyVerifierTest.java                    |    7 +-
 .../MyAllInOneColorVerificationTest.java           |    6 +-
 .../MyColorVerificationTest.java                   |    6 +-
 .../qos/cal10n/{util => verifier}/PackageTest.java |    5 +-
 17 files changed, 155 insertions(+), 86 deletions(-)
 rename cal10n-api/src/main/java/ch/qos/cal10n/util/{StringToLocale.java => MiscUtil.java} (77%)
 rename cal10n-api/src/test/java/ch/qos/cal10n/{sample => }/MessageConveyorPerftest.java (91%)
 create mode 100644 cal10n-api/src/test/java/ch/qos/cal10n/MessageConveyorReloadTest.java
 rename cal10n-api/src/test/java/ch/qos/cal10n/{sample => }/MessageConveyorTest.java (79%)
 rename cal10n-api/src/test/java/ch/qos/cal10n/{sample => }/PackageTest.java (85%)
 copy cal10n-api/src/test/java/ch/qos/cal10n/util/{AnnotationExtractorTest.java => MiscUtilTest.java} (60%)
 rename cal10n-api/src/test/java/ch/qos/cal10n/{sample => verifier}/MessageKeyVerifierTest.java (90%)
 rename cal10n-api/src/test/java/ch/qos/cal10n/{sample => verifier}/MyAllInOneColorVerificationTest.java (87%)
 rename cal10n-api/src/test/java/ch/qos/cal10n/{sample => verifier}/MyColorVerificationTest.java (88%)
 copy cal10n-api/src/test/java/ch/qos/cal10n/{util => verifier}/PackageTest.java (87%)


hooks/post-receive
-- 
Compiler assisted localization library


More information about the cal10n-dev mailing list