Test the German messages in the TCK.
[JSR 303 TCK Result] 155 of 257 (60.31%) Pass with 25 Failures and 7 Errors.

Review at http://gwt-code-reviews.appspot.com/1510805

Review by: rchandia@google.com

git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@10511 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/user/test/com/google/gwt/validation/tck/MessageInterpolationGwtSuite.java b/user/test/com/google/gwt/validation/tck/MessageInterpolationGwtSuite.java
index d90ec24..a0f196e 100644
--- a/user/test/com/google/gwt/validation/tck/MessageInterpolationGwtSuite.java
+++ b/user/test/com/google/gwt/validation/tck/MessageInterpolationGwtSuite.java
@@ -18,6 +18,7 @@
 import junit.framework.Test;
 
 import org.hibernate.jsr303.tck.tests.messageinterpolation.MessageInterpolationGwtTest;
+import org.hibernate.jsr303.tck.tests.messageinterpolation.MessageInterpolation_de_GwtTest;
 import org.hibernate.jsr303.tck.util.TckTestSuiteWrapper;
 
 /**
@@ -28,6 +29,7 @@
     TckTestSuiteWrapper suite = new TckTestSuiteWrapper(
         "TCK for GWT Validation, messageinterpolation package");
     suite.addTestSuite(MessageInterpolationGwtTest.class);
+    suite.addTestSuite(MessageInterpolation_de_GwtTest.class);
     return suite;
   }
 }
diff --git a/user/test/org/hibernate/jsr303/tck/tests/messageinterpolation/MessageInterpolationGwtTest.java b/user/test/org/hibernate/jsr303/tck/tests/messageinterpolation/MessageInterpolationGwtTest.java
index 5a71397..c3c0eb2 100644
--- a/user/test/org/hibernate/jsr303/tck/tests/messageinterpolation/MessageInterpolationGwtTest.java
+++ b/user/test/org/hibernate/jsr303/tck/tests/messageinterpolation/MessageInterpolationGwtTest.java
@@ -17,8 +17,6 @@
 
 import com.google.gwt.junit.client.GWTTestCase;
 
-import org.hibernate.jsr303.tck.util.client.Failing;
-
 /**
  * Wraps {@link MessageInterpolationTest}.
  */
@@ -46,11 +44,6 @@
     delegate.testLiteralCurlyBraces();
   }
 
-  @Failing(issue = 5763)
-  public void testMessageInterpolationWithLocale() {
-    delegate.testMessageInterpolationWithLocale();
-  }
-
   public void testMessagesCanBeOverriddenAtConstraintLevel() {
     delegate.testMessagesCanBeOverriddenAtConstraintLevel();
   }
@@ -74,5 +67,4 @@
   public void testUnSuccessfulInterpolation() {
     delegate.testUnSuccessfulInterpolation();
   }
-
 }
diff --git a/user/test/org/hibernate/jsr303/tck/tests/messageinterpolation/MessageInterpolation_de_GwtTest.java b/user/test/org/hibernate/jsr303/tck/tests/messageinterpolation/MessageInterpolation_de_GwtTest.java
new file mode 100644
index 0000000..4ae7a46
--- /dev/null
+++ b/user/test/org/hibernate/jsr303/tck/tests/messageinterpolation/MessageInterpolation_de_GwtTest.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2010 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package org.hibernate.jsr303.tck.tests.messageinterpolation;
+
+import com.google.gwt.junit.client.GWTTestCase;
+
+/**
+ * Wraps the German only part of {@link MessageInterpolationTest}.
+ */
+public class MessageInterpolation_de_GwtTest extends GWTTestCase {
+  private final MessageInterpolationTest delegate = new MessageInterpolationTest();
+
+  @Override
+  public String getModuleName() {
+    return "org.hibernate.jsr303.tck.tests.messageinterpolation.TckTest_de";
+  }
+
+  public void testMessageInterpolationWithLocale() {
+    // Note this test doesn't actually pass in the de local, instead it sets the
+    // default local as de.
+    delegate.testMessageInterpolationWithLocale();
+  }
+}
diff --git a/user/test/org/hibernate/jsr303/tck/tests/messageinterpolation/TckTest.gwt.xml b/user/test/org/hibernate/jsr303/tck/tests/messageinterpolation/TckTest.gwt.xml
index 668b796..8f8f063 100644
--- a/user/test/org/hibernate/jsr303/tck/tests/messageinterpolation/TckTest.gwt.xml
+++ b/user/test/org/hibernate/jsr303/tck/tests/messageinterpolation/TckTest.gwt.xml
@@ -20,7 +20,7 @@
   <source path="">
     <include name="*.java" />
   </source>
-  <replace-with class="org.hibernate.jsr303.tck.tests.messageinterpolation.TckUserValidationMessageProvider">
+  <replace-with class="org.hibernate.jsr303.tck.tests.messageinterpolation.TckUserValidationMessageResolver">
     <when-type-is class="com.google.gwt.validation.client.UserValidationMessagesResolver" />
   </replace-with>
   <replace-with class="org.hibernate.jsr303.tck.tests.messageinterpolation.TckTestValidatorFactory">
diff --git a/user/test/org/hibernate/jsr303/tck/tests/messageinterpolation/TckTest_de.gwt.xml b/user/test/org/hibernate/jsr303/tck/tests/messageinterpolation/TckTest_de.gwt.xml
new file mode 100644
index 0000000..f53fb5f
--- /dev/null
+++ b/user/test/org/hibernate/jsr303/tck/tests/messageinterpolation/TckTest_de.gwt.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.0.1//EN" "http://google-web-toolkit.googlecode.com/svn/tags/2.0.1/distro-source/core/src/gwt-module.dtd">
+<!--
+  Copyright 2010 Google Inc.
+
+  Licensed under the Apache License, Version 2.0 (the "License"); you may not
+  use this file except in compliance with the License. You may obtain a copy of
+  the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+  License for the specific language governing permissions and limitations under
+  the License.
+-->
+<module>
+  <inherits name="org.hibernate.jsr303.tck.tests.ValidationTck" />
+  <source path="">
+    <include name="*.java" />
+  </source>
+  <replace-with class="org.hibernate.jsr303.tck.tests.messageinterpolation.TckUserValidationMessageResolver">
+    <when-type-is class="com.google.gwt.validation.client.UserValidationMessagesResolver" />
+  </replace-with>
+  <replace-with class="org.hibernate.jsr303.tck.tests.messageinterpolation.TckTestValidatorFactory">
+    <when-type-is class="javax.validation.ValidatorFactory"/>
+  </replace-with>
+  	<extend-property name="locale" values="de"/>
+	<set-property name = "locale" value = "de"/>
+</module>
\ No newline at end of file
diff --git a/user/test/org/hibernate/jsr303/tck/tests/messageinterpolation/TckUserValidationMessageProvider.java b/user/test/org/hibernate/jsr303/tck/tests/messageinterpolation/TckUserValidationMessageResolver.java
similarity index 91%
rename from user/test/org/hibernate/jsr303/tck/tests/messageinterpolation/TckUserValidationMessageProvider.java
rename to user/test/org/hibernate/jsr303/tck/tests/messageinterpolation/TckUserValidationMessageResolver.java
index 1e06390..e87d47c 100644
--- a/user/test/org/hibernate/jsr303/tck/tests/messageinterpolation/TckUserValidationMessageProvider.java
+++ b/user/test/org/hibernate/jsr303/tck/tests/messageinterpolation/TckUserValidationMessageResolver.java
@@ -23,11 +23,11 @@
 /**
  * Custom messages from {@link ValidationMessages}.
  */
-public class TckUserValidationMessageProvider extends
+public class TckUserValidationMessageResolver extends
     AbstractValidationMessageResolver implements
     UserValidationMessagesResolver {
 
-  public TckUserValidationMessageProvider() {
+  public TckUserValidationMessageResolver() {
     super((ConstantsWithLookup) GWT.create(ValidationMessages.class));
   }
 }