Add the final two TCK test classes.

[JSR 303 TCK Result] WARNING only 252 of 258 (97.67%) TCK Tests Covered.
[JSR 303 TCK Result] 157 of 205 (76.59%) Pass with 35 Failures and 7 Errors.

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

Review by: rjrjr@google.com

git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@10714 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/user/test/com/google/gwt/validation/tck/ValidationGwtSuite.java b/user/test/com/google/gwt/validation/tck/ValidationGwtSuite.java
index 8510661..bee43d8 100644
--- a/user/test/com/google/gwt/validation/tck/ValidationGwtSuite.java
+++ b/user/test/com/google/gwt/validation/tck/ValidationGwtSuite.java
@@ -23,6 +23,7 @@
 import org.hibernate.jsr303.tck.tests.validation.ValidateGwtTest;
 import org.hibernate.jsr303.tck.tests.validation.ValidatePropertyGwtTest;
 import org.hibernate.jsr303.tck.tests.validation.ValidateValueGwtTest;
+import org.hibernate.jsr303.tck.tests.validation.ValidateWithGroupsGwtTest;
 import org.hibernate.jsr303.tck.tests.validation.ValidationGwtTest;
 import org.hibernate.jsr303.tck.util.TckTestSuiteWrapper;
 
@@ -39,6 +40,7 @@
     suite.addTestSuite(ValidateCompileTest.class);
     suite.addTestSuite(ValidatePropertyGwtTest.class);
     suite.addTestSuite(ValidateValueGwtTest.class);
+    suite.addTestSuite(ValidateWithGroupsGwtTest.class);
     suite.addTestSuite(ValidationGwtTest.class);
     return suite;
   }
diff --git a/user/test/com/google/gwt/validation/tck/ValidatorContextGwtSuite.java b/user/test/com/google/gwt/validation/tck/ValidatorContextGwtSuite.java
new file mode 100644
index 0000000..85da613
--- /dev/null
+++ b/user/test/com/google/gwt/validation/tck/ValidatorContextGwtSuite.java
@@ -0,0 +1,33 @@
+/*
+ * 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 com.google.gwt.validation.tck;
+
+import junit.framework.Test;
+
+import org.hibernate.jsr303.tck.tests.validation.validatorcontext.ConstraintValidatorContextGwtTest;
+import org.hibernate.jsr303.tck.util.TckTestSuiteWrapper;
+
+/**
+ * Tck Tests for the {@code validation validatorcontext} package.
+ */
+public class ValidatorContextGwtSuite {
+  public static Test suite() {
+    TckTestSuiteWrapper suite = new TckTestSuiteWrapper(
+        "TCK for GWT Validation, validation  validatorcontext package");
+    suite.addTestSuite(ConstraintValidatorContextGwtTest.class);
+    return suite;
+  }
+}
diff --git a/user/test/org/hibernate/jsr303/tck/tests/validation/ValidateWithGroupsGwtTest.java b/user/test/org/hibernate/jsr303/tck/tests/validation/ValidateWithGroupsGwtTest.java
new file mode 100644
index 0000000..74375b9b
--- /dev/null
+++ b/user/test/org/hibernate/jsr303/tck/tests/validation/ValidateWithGroupsGwtTest.java
@@ -0,0 +1,38 @@
+/*
+ * 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.validation;
+
+
+/**
+ * Test wrapper for {@link ValidateWithGroupsTest}.
+ */
+public class ValidateWithGroupsGwtTest extends AbstractValidationTest {
+
+  private final ValidateWithGroupsTest delegate = new ValidateWithGroupsTest();
+
+  public void testCorrectGroupsAreAppliedForValidate() {
+    delegate.testCorrectGroupsAreAppliedForValidate();
+  }
+
+  public void testCorrectGroupsAreAppliedForValidateProperty() {
+    delegate.testCorrectGroupsAreAppliedForValidateProperty();
+  }
+
+  public void testCorrectGroupsAreAppliedForValidateValue() {
+    delegate.testCorrectGroupsAreAppliedForValidateValue();
+  }
+
+}
diff --git a/user/test/org/hibernate/jsr303/tck/tests/validation/validatorcontext/ConstraintValidatorContextGwtTest.java b/user/test/org/hibernate/jsr303/tck/tests/validation/validatorcontext/ConstraintValidatorContextGwtTest.java
new file mode 100644
index 0000000..c3c1cb6
--- /dev/null
+++ b/user/test/org/hibernate/jsr303/tck/tests/validation/validatorcontext/ConstraintValidatorContextGwtTest.java
@@ -0,0 +1,50 @@
+/*
+ * 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.validation.validatorcontext;
+
+import com.google.gwt.junit.client.GWTTestCase;
+
+import org.hibernate.jsr303.tck.util.client.Failing;
+
+/**
+ * Test wrapper for {@link ConstraintValidatorContextTest}.
+ */
+public class ConstraintValidatorContextGwtTest extends GWTTestCase {
+
+  private final ConstraintValidatorContextTest delegate = new ConstraintValidatorContextTest();
+
+  @Override
+  public String getModuleName() {
+    return "org.hibernate.jsr303.tck.tests.validation.validatorcontext.TckTest";
+  }
+
+  public void testDefaultError() {
+    delegate.testDefaultError();
+  }
+
+  public void testDisableDefaultErrorWithCustomErrorNoSubNode() {
+    delegate.testDisableDefaultErrorWithCustomErrorNoSubNode();
+  }
+
+  @Failing(issue = 6907)
+  public void testDisableDefaultErrorWithCustomErrorWithSubNode() {
+    delegate.testDisableDefaultErrorWithCustomErrorWithSubNode();
+  }
+
+  public void testDisableDefaultErrorWithoutAddingCustomError() {
+    delegate.testDisableDefaultErrorWithoutAddingCustomError();
+  }
+}
diff --git a/user/test/org/hibernate/jsr303/tck/tests/validation/validatorcontext/TckTest.gwt.xml b/user/test/org/hibernate/jsr303/tck/tests/validation/validatorcontext/TckTest.gwt.xml
new file mode 100644
index 0000000..3142b82
--- /dev/null
+++ b/user/test/org/hibernate/jsr303/tck/tests/validation/validatorcontext/TckTest.gwt.xml
@@ -0,0 +1,26 @@
+<?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.validation.validatorcontext.TckTestValidatorFactory">
+    <when-type-is class="javax.validation.ValidatorFactory"/>
+  </replace-with>
+</module>
\ No newline at end of file
diff --git a/user/test/org/hibernate/jsr303/tck/tests/validation/validatorcontext/TckTestValidatorFactory.java b/user/test/org/hibernate/jsr303/tck/tests/validation/validatorcontext/TckTestValidatorFactory.java
new file mode 100644
index 0000000..7e76cb8
--- /dev/null
+++ b/user/test/org/hibernate/jsr303/tck/tests/validation/validatorcontext/TckTestValidatorFactory.java
@@ -0,0 +1,41 @@
+/*
+ * 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.validation.validatorcontext;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.validation.client.AbstractGwtValidatorFactory;
+import com.google.gwt.validation.client.GwtValidation;
+import com.google.gwt.validation.client.impl.AbstractGwtValidator;
+
+import javax.validation.Validator;
+
+/**
+ * {@link AbstractGwtValidatorFactory} implementation that uses
+ * {@link com.google.gwt.validation.client.GwtValidation GwtValidation}.
+ */
+public final class TckTestValidatorFactory extends AbstractGwtValidatorFactory {
+  /**
+   * Marker Interface for {@link GWT#create(Class)}.
+   */
+  @GwtValidation(value = {DummyBean.class})
+  public static interface GwtValidator extends Validator {
+  }
+
+  @Override
+  public AbstractGwtValidator createValidator() {
+    return GWT.create(GwtValidator.class);
+  }
+}