Revision: 10377
Author:   [email protected]
Date:     Wed Jun 22 06:42:43 2011
Log:      Add more TCK tests.

[JSR 303 TCK Result] 143 of 257 (55.64%) Pass with 22 Failures and 8 Errors.

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

Review by: [email protected]
http://code.google.com/p/google-web-toolkit/source/detail?r=10377

Added:
/trunk/user/test/com/google/gwt/validation/tck/GroupInheritanceGwtSuite.java
 /trunk/user/test/com/google/gwt/validation/tck/GroupSequenceGwtSuite.java
/trunk/user/test/com/google/gwt/validation/tck/GroupSequenceIsolationGwtSuite.java /trunk/user/test/org/hibernate/jsr303/tck/tests/constraints/groups/DefaultGroupRedefinitionCompileTest.java /trunk/user/test/org/hibernate/jsr303/tck/tests/constraints/groups/DefaultGroupRedefinitionGwtTest.java /trunk/user/test/org/hibernate/jsr303/tck/tests/constraints/groups/GroupSequenceContainingDefaultTest.gwt.xml /trunk/user/test/org/hibernate/jsr303/tck/tests/constraints/groups/GroupSequenceContainingDefaultValidatorFactory.java /trunk/user/test/org/hibernate/jsr303/tck/tests/constraints/groups/GroupSequenceWithNoImplicitDefaultGroupTest.gwt.xml /trunk/user/test/org/hibernate/jsr303/tck/tests/constraints/groups/GroupSequenceWithNoImplicitDefaultGroupValidatorFactory.java /trunk/user/test/org/hibernate/jsr303/tck/tests/constraints/groups/groupsequence /trunk/user/test/org/hibernate/jsr303/tck/tests/constraints/groups/groupsequence/SequenceResolutionGwtTest.java /trunk/user/test/org/hibernate/jsr303/tck/tests/constraints/groups/groupsequence/TckTest.gwt.xml /trunk/user/test/org/hibernate/jsr303/tck/tests/constraints/groups/groupsequence/TckTestValidatorFactory.java /trunk/user/test/org/hibernate/jsr303/tck/tests/constraints/groups/groupsequenceisolation /trunk/user/test/org/hibernate/jsr303/tck/tests/constraints/groups/groupsequenceisolation/GroupSequenceIsolationGwtTest.java /trunk/user/test/org/hibernate/jsr303/tck/tests/constraints/groups/groupsequenceisolation/TckTest.gwt.xml /trunk/user/test/org/hibernate/jsr303/tck/tests/constraints/groups/groupsequenceisolation/TckTestValidatorFactory.java /trunk/user/test/org/hibernate/jsr303/tck/tests/constraints/groups/inheritance /trunk/user/test/org/hibernate/jsr303/tck/tests/constraints/groups/inheritance/GroupInheritanceGwtTest.java /trunk/user/test/org/hibernate/jsr303/tck/tests/constraints/groups/inheritance/TckTest.gwt.xml /trunk/user/test/org/hibernate/jsr303/tck/tests/constraints/groups/inheritance/TckTestValidatorFactory.java
Modified:
/trunk/user/test/com/google/gwt/validation/tck/ConstraintsGroupsGwtSuite.java /trunk/user/test/org/hibernate/jsr303/tck/tests/constraints/groups/TckTestValidatorFactory.java

=======================================
--- /dev/null
+++ /trunk/user/test/com/google/gwt/validation/tck/GroupInheritanceGwtSuite.java Wed Jun 22 06:42:43 2011
@@ -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.constraints.groups.inheritance.GroupInheritanceGwtTest;
+import org.hibernate.jsr303.tck.util.TckTestSuiteWrapper;
+
+/**
+ * Tck Tests for the group inheritance.
+ */
+public class GroupInheritanceGwtSuite {
+  public static Test suite() {
+    TckTestSuiteWrapper suite = new TckTestSuiteWrapper(
+        "TCK for GWT Validation, group inheritance");
+    suite.addTestSuite(GroupInheritanceGwtTest.class);
+    return suite;
+  }
+}
=======================================
--- /dev/null
+++ /trunk/user/test/com/google/gwt/validation/tck/GroupSequenceGwtSuite.java Wed Jun 22 06:42:43 2011
@@ -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.constraints.groups.groupsequence.SequenceResolutionGwtTest;
+import org.hibernate.jsr303.tck.util.TckTestSuiteWrapper;
+
+/**
+ * Tck Tests for Group Sequences.
+ */
+public class GroupSequenceGwtSuite {
+  public static Test suite() {
+    TckTestSuiteWrapper suite = new TckTestSuiteWrapper(
+        "TCK for GWT Validation: Group Sequence tests.");
+    suite.addTestSuite(SequenceResolutionGwtTest.class);
+    return suite;
+  }
+}
=======================================
--- /dev/null
+++ /trunk/user/test/com/google/gwt/validation/tck/GroupSequenceIsolationGwtSuite.java Wed Jun 22 06:42:43 2011
@@ -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.constraints.groups.groupsequenceisolation.GroupSequenceIsolationGwtTest;
+import org.hibernate.jsr303.tck.util.TckTestSuiteWrapper;
+
+/**
+ * Tck Tests for Group Sequence Isolation.
+ */
+public class GroupSequenceIsolationGwtSuite {
+  public static Test suite() {
+    TckTestSuiteWrapper suite = new TckTestSuiteWrapper(
+        "TCK for GWT Validation: Group Sequence Isolation tests.");
+    suite.addTestSuite(GroupSequenceIsolationGwtTest.class);
+    return suite;
+  }
+}
=======================================
--- /dev/null
+++ /trunk/user/test/org/hibernate/jsr303/tck/tests/constraints/groups/DefaultGroupRedefinitionCompileTest.java Wed Jun 22 06:42:43 2011
@@ -0,0 +1,75 @@
+/*
+ * 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.constraints.groups;
+
+import com.google.gwt.core.ext.TreeLogger;
+import com.google.gwt.core.ext.UnableToCompleteException;
+import com.google.gwt.dev.util.UnitTestTreeLogger;
+
+import static org.hibernate.jsr303.tck.util.TckGeneratorTestUtils.assertModuleFails; +import static org.hibernate.jsr303.tck.util.TckGeneratorTestUtils.getFullyQaulifiedModuleName;
+
+import org.hibernate.jsr303.tck.util.TckCompileTestCase;
+
+import javax.validation.GroupDefinitionException;
+
+/**
+ * Test wrapper for {@link DefaultGroupRedefinitionTest} tests that are meant to
+ * fail to compile.
+ */
+public class DefaultGroupRedefinitionCompileTest extends TckCompileTestCase {
+
+  public void testGroupSequenceContainingDefault()
+      throws UnableToCompleteException {
+
+    UnitTestTreeLogger.Builder builder = new UnitTestTreeLogger.Builder();
+    builder.expect(TreeLogger.ERROR, //
+        "Unable to create a validator for "
+            + "org.hibernate.jsr303.tck.tests.constraints.groups."
+ + "DefaultGroupRedefinitionTest.AddressWithDefaultInGroupSequence "
+            + "because 'Default.class' cannot appear in default group "
+            + "sequence list.", //
+        GroupDefinitionException.class);
+    builder.setLowestLogLevel(TreeLogger.INFO);
+    UnitTestTreeLogger testLogger = builder.createLogger();
+    assertModuleFails(
+        testLogger,
+        getFullyQaulifiedModuleName(getClass(),
+            "GroupSequenceContainingDefaultTest"),
+ GroupSequenceContainingDefaultValidatorFactory.GroupSequenceContainingDefaultValidator.class);
+  }
+
+  public void testGroupSequenceWithNoImplicitDefaultGroup()
+      throws UnableToCompleteException {
+
+    UnitTestTreeLogger.Builder builder = new UnitTestTreeLogger.Builder();
+    builder.expect(TreeLogger.ERROR, //
+        "Unable to create a validator for "
+            + "org.hibernate.jsr303.tck.tests.constraints.groups."
+ + "DefaultGroupRedefinitionTest.AddressWithDefaultInGroupSequence "
+            + "because 'Default.class' cannot appear in default group "
+            + "sequence list.", //
+        GroupDefinitionException.class);
+    builder.setLowestLogLevel(TreeLogger.INFO);
+    UnitTestTreeLogger testLogger = builder.createLogger();
+    assertModuleFails(
+        testLogger,
+        getFullyQaulifiedModuleName(getClass(),
+            "GroupSequenceContainingDefaultTest"),
+ GroupSequenceWithNoImplicitDefaultGroupValidatorFactory.TestValidator.class);
+  }
+
+}
=======================================
--- /dev/null
+++ /trunk/user/test/org/hibernate/jsr303/tck/tests/constraints/groups/DefaultGroupRedefinitionGwtTest.java Wed Jun 22 06:42:43 2011
@@ -0,0 +1,42 @@
+/*
+ * 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.constraints.groups;
+
+import com.google.gwt.junit.client.GWTTestCase;
+
+import org.hibernate.jsr303.tck.util.client.Failing;
+
+/**
+ * Test wrapper for {@link DefaultGroupRedefinitionTest}.
+ */
+public class DefaultGroupRedefinitionGwtTest extends GWTTestCase {
+ private final DefaultGroupRedefinitionTest delegate = new DefaultGroupRedefinitionTest();
+
+  @Override
+  public String getModuleName() {
+    return "org.hibernate.jsr303.tck.tests.constraints.groups.TckTest";
+  }
+
+  @Failing(issue = 5801)
+  public void testRedefiningDefaultGroup() {
+    delegate.testRedefiningDefaultGroup();
+  }
+
+  @Failing(issue = 5801)
+  public void testValidatingAgainstRedefinedDefaultGroup() {
+    delegate.testValidatingAgainstRedefinedDefaultGroup();
+  }
+}
=======================================
--- /dev/null
+++ /trunk/user/test/org/hibernate/jsr303/tck/tests/constraints/groups/GroupSequenceContainingDefaultTest.gwt.xml Wed Jun 22 06:42:43 2011
@@ -0,0 +1,27 @@
+<?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" />
+    <exclude name="*CompileTest.java" />
+  </source>
+ <replace-with class="org.hibernate.jsr303.tck.tests.constraints.groups.GroupSequenceContainingDefaultValidatorFactory">
+    <when-type-is class="javax.validation.ValidatorFactory"/>
+  </replace-with>
+</module>
=======================================
--- /dev/null
+++ /trunk/user/test/org/hibernate/jsr303/tck/tests/constraints/groups/GroupSequenceContainingDefaultValidatorFactory.java Wed Jun 22 06:42:43 2011
@@ -0,0 +1,47 @@
+/*
+ * 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.constraints.groups;
+
+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 org.hibernate.jsr303.tck.tests.constraints.groups.DefaultGroupRedefinitionTest.AddressWithDefaultInGroupSequence;
+
+import javax.validation.Validator;
+
+/**
+ * ValidatorFactory for
+ * {@link DefaultGroupRedefinitionTest#testGroupSequenceContainingDefault()}
+ */
+public final class GroupSequenceContainingDefaultValidatorFactory extends
+    AbstractGwtValidatorFactory {
+
+  /**
+   * Validator for
+ * {@link DefaultGroupRedefinitionTest#testGroupSequenceContainingDefault()}
+   */
+  @GwtValidation(value = {AddressWithDefaultInGroupSequence.class})
+  public static interface GroupSequenceContainingDefaultValidator extends
+      Validator {
+  }
+
+  @Override
+  public AbstractGwtValidator createValidator() {
+    return GWT.create(GroupSequenceContainingDefaultValidator.class);
+  }
+}
=======================================
--- /dev/null
+++ /trunk/user/test/org/hibernate/jsr303/tck/tests/constraints/groups/GroupSequenceWithNoImplicitDefaultGroupTest.gwt.xml Wed Jun 22 06:42:43 2011
@@ -0,0 +1,27 @@
+<?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" />
+    <exclude name="*CompileTest.java" />
+  </source>
+ <replace-with class="org.hibernate.jsr303.tck.tests.constraints.groups.GroupSequenceContainingDefaultValidatorFactory">
+    <when-type-is class="javax.validation.ValidatorFactory"/>
+  </replace-with>
+</module>
=======================================
--- /dev/null
+++ /trunk/user/test/org/hibernate/jsr303/tck/tests/constraints/groups/GroupSequenceWithNoImplicitDefaultGroupValidatorFactory.java Wed Jun 22 06:42:43 2011
@@ -0,0 +1,46 @@
+/*
+ * 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.constraints.groups;
+
+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 org.hibernate.jsr303.tck.tests.constraints.groups.DefaultGroupRedefinitionTest.AddressWithDefaultInGroupSequence;
+
+import javax.validation.Validator;
+
+/**
+ * ValidatorFactory for
+ * {@link DefaultGroupRedefinitionTest#testGroupSequenceWithNoImplicitDefaultGroup()}
+ */
+public final class GroupSequenceWithNoImplicitDefaultGroupValidatorFactory extends
+    AbstractGwtValidatorFactory {
+
+  /**
+   * Validator for
+ * {@link DefaultGroupRedefinitionTest#testGroupSequenceWithNoImplicitDefaultGroup()}
+   */
+  @GwtValidation(value = {AddressWithDefaultInGroupSequence.class})
+  public static interface TestValidator extends Validator {
+  }
+
+  @Override
+  public AbstractGwtValidator createValidator() {
+    return GWT.create(TestValidator.class);
+  }
+}
=======================================
--- /dev/null
+++ /trunk/user/test/org/hibernate/jsr303/tck/tests/constraints/groups/groupsequence/SequenceResolutionGwtTest.java Wed Jun 22 06:42:43 2011
@@ -0,0 +1,63 @@
+/*
+ * 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.constraints.groups.groupsequence;
+
+import com.google.gwt.junit.client.GWTTestCase;
+
+import org.hibernate.jsr303.tck.util.client.Failing;
+import org.hibernate.jsr303.tck.util.client.NonTckTest;
+
+import javax.validation.GroupDefinitionException;
+
+/**
+ * Test wrapper for {@link SequenceResolutionTest}.
+ */
+public class SequenceResolutionGwtTest extends GWTTestCase {
+ private final SequenceResolutionTest delegate = new SequenceResolutionTest();
+
+  @Override
+  public String getModuleName() {
+ return "org.hibernate.jsr303.tck.tests.constraints.groups.groupsequence.TckTest";
+  }
+
+  @NonTckTest
+  public void testDummy() {
+    // There must be at least one passing test.
+  }
+
+  @Failing(issue = 6291)
+  public void testGroupSequenceContainerOtherGroupSequences() {
+    try {
+      delegate.testGroupSequenceContainerOtherGroupSequences();
+      fail("Expected a " + GroupDefinitionException.class);
+    } catch (GroupDefinitionException expected) {
+    }
+  }
+
+  @Failing(issue = 6291)
+  public void testInvalidDefinitionOfDefaultSequenceInEntity() {
+    try {
+      delegate.testInvalidDefinitionOfDefaultSequenceInEntity();
+      fail("Expected a " + GroupDefinitionException.class);
+    } catch (GroupDefinitionException expected) {
+    }
+  }
+
+  @Failing(issue = 6291)
+  public void testOnlyFirstGroupInSequenceGetEvaluated() {
+    delegate.testOnlyFirstGroupInSequenceGetEvaluated();
+  }
+}
=======================================
--- /dev/null
+++ /trunk/user/test/org/hibernate/jsr303/tck/tests/constraints/groups/groupsequence/TckTest.gwt.xml Wed Jun 22 06:42:43 2011
@@ -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.constraints.groups.groupsequence.TckTestValidatorFactory">
+    <when-type-is class="javax.validation.ValidatorFactory"/>
+  </replace-with>
+</module>
=======================================
--- /dev/null
+++ /trunk/user/test/org/hibernate/jsr303/tck/tests/constraints/groups/groupsequence/TckTestValidatorFactory.java Wed Jun 22 06:42:43 2011
@@ -0,0 +1,43 @@
+/*
+ * 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.constraints.groups.groupsequence;
+
+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 org.hibernate.jsr303.tck.tests.constraints.groups.groupsequence.SequenceResolutionTest.Car;
+
+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 to {@link GWT#create(Class)}.
+   */
+  @GwtValidation(value = {Car.class, TestEntity.class})
+  public static interface GwtValidator extends Validator {
+  }
+
+  @Override
+  public AbstractGwtValidator createValidator() {
+    return GWT.create(GwtValidator.class);
+  }
+}
=======================================
--- /dev/null
+++ /trunk/user/test/org/hibernate/jsr303/tck/tests/constraints/groups/groupsequenceisolation/GroupSequenceIsolationGwtTest.java Wed Jun 22 06:42:43 2011
@@ -0,0 +1,65 @@
+/*
+ * 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.constraints.groups.groupsequenceisolation;
+
+import com.google.gwt.junit.client.GWTTestCase;
+
+import org.hibernate.jsr303.tck.util.client.Failing;
+import org.hibernate.jsr303.tck.util.client.NonTckTest;
+
+/**
+ * Test wrapper for {@link GroupSequenceIsolationTest}.
+ */
+public class GroupSequenceIsolationGwtTest extends GWTTestCase {
+ private final GroupSequenceIsolationTest delegate = new GroupSequenceIsolationTest();
+
+  @Override
+  public String getModuleName() {
+ return "org.hibernate.jsr303.tck.tests.constraints.groups.groupsequenceisolation.TckTest";
+  }
+
+  @Failing(issue = 6291)
+ public void testCorrectDefaultSequenceContainedCaseWithGroupRedefinitionOnContainedEntity() {
+    delegate
+        
.testCorrectDefaultSequenceContainedCaseWithGroupRedefinitionOnContainedEntity();
+  }
+
+  @Failing(issue = 6291)
+ public void testCorrectDefaultSequenceContainedCaseWithoutGroupRedefinitionOnContainedEntity() {
+    delegate
+        
.testCorrectDefaultSequenceContainedCaseWithoutGroupRedefinitionOnContainedEntity();
+  }
+
+  @Failing(issue = 6291)
+  public void testCorrectDefaultSequenceInheritance() {
+    delegate.testCorrectDefaultSequenceInheritance();
+  }
+
+  @Failing(issue = 6291)
+  public void testCorrectDefaultSequenceInheritance2() {
+    delegate.testCorrectDefaultSequenceInheritance2();
+  }
+
+  @Failing(issue = 6291)
+  public void testCorrectDefaultSequenceInheritance3() {
+    delegate.testCorrectDefaultSequenceInheritance3();
+  }
+
+  @NonTckTest
+  public void testDummy() {
+    // There must be at least one passing test.
+  }
+}
=======================================
--- /dev/null
+++ /trunk/user/test/org/hibernate/jsr303/tck/tests/constraints/groups/groupsequenceisolation/TckTest.gwt.xml Wed Jun 22 06:42:43 2011
@@ -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.constraints.groups.groupsequenceisolation.TckTestValidatorFactory">
+    <when-type-is class="javax.validation.ValidatorFactory"/>
+  </replace-with>
+</module>
=======================================
--- /dev/null
+++ /trunk/user/test/org/hibernate/jsr303/tck/tests/constraints/groups/groupsequenceisolation/TckTestValidatorFactory.java Wed Jun 22 06:42:43 2011
@@ -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.constraints.groups.groupsequenceisolation;
+
+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 to {@link GWT#create(Class)}.
+   */
+  @GwtValidation(value = {B1.class, B2.class, B3.class, C.class, E.class})
+  public static interface GwtValidator extends Validator {
+  }
+
+  @Override
+  public AbstractGwtValidator createValidator() {
+    return GWT.create(GwtValidator.class);
+  }
+}
=======================================
--- /dev/null
+++ /trunk/user/test/org/hibernate/jsr303/tck/tests/constraints/groups/inheritance/GroupInheritanceGwtTest.java Wed Jun 22 06:42:43 2011
@@ -0,0 +1,53 @@
+/*
+ * 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.constraints.groups.inheritance;
+
+import com.google.gwt.junit.client.GWTTestCase;
+
+import org.hibernate.jsr303.tck.util.client.Failing;
+import org.hibernate.jsr303.tck.util.client.NonTckTest;
+
+/**
+ * Test wrapper for {@link GroupInheritanceTest}.
+ */
+public class GroupInheritanceGwtTest extends GWTTestCase {
+  // TODO(nchalko) causes com.google.gwt.dev.jjs.InternalCompilerException:
+  // see http://code.google.com/p/google-web-toolkit/issues/detail?id=6508
+ // private final GroupInheritanceTest delegate = new GroupInheritanceTest();
+
+  @Override
+  public String getModuleName() {
+ return "org.hibernate.jsr303.tck.tests.constraints.groups.inheritance.TckTest";
+  }
+
+
+  @NonTckTest
+  public void testDummy() {
+    // There must be at least one passing test.
+  }
+
+  @Failing(issue = 5801)
+  public void testGroupCanInheritGroupsViaInterfaceInheritance() {
+    // delegate.testGroupCanInheritGroupsViaInterfaceInheritance();
+ fail("See http://code.google.com/p/google-web-toolkit/issues/detail?id=6508";);
+  }
+
+  @Failing(issue = 5801)
+  public void testGroupMembership() {
+    // delegate.testGroupMembership();
+ fail("See http://code.google.com/p/google-web-toolkit/issues/detail?id=6508";);
+  }
+}
=======================================
--- /dev/null
+++ /trunk/user/test/org/hibernate/jsr303/tck/tests/constraints/groups/inheritance/TckTest.gwt.xml Wed Jun 22 06:42:43 2011
@@ -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.constraints.groups.inheritance.TckTestValidatorFactory">
+    <when-type-is class="javax.validation.ValidatorFactory"/>
+  </replace-with>
+</module>
=======================================
--- /dev/null
+++ /trunk/user/test/org/hibernate/jsr303/tck/tests/constraints/groups/inheritance/TckTestValidatorFactory.java Wed Jun 22 06:42:43 2011
@@ -0,0 +1,44 @@
+/*
+ * 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.constraints.groups.inheritance;
+
+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 org.hibernate.jsr303.tck.tests.constraints.groups.inheritance.GroupInheritanceTest.MiniaturePart; +import org.hibernate.jsr303.tck.tests.constraints.groups.inheritance.GroupInheritanceTest.Part;
+
+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 to {@link GWT#create(Class)}.
+   */
+  @GwtValidation(value = {MiniaturePart.class, Part.class})
+  public static interface GwtValidator extends Validator {
+  }
+
+  @Override
+  public AbstractGwtValidator createValidator() {
+    return GWT.create(GwtValidator.class);
+  }
+}
=======================================
--- /trunk/user/test/com/google/gwt/validation/tck/ConstraintsGroupsGwtSuite.java Mon Mar 21 12:22:19 2011 +++ /trunk/user/test/com/google/gwt/validation/tck/ConstraintsGroupsGwtSuite.java Wed Jun 22 06:42:43 2011
@@ -17,6 +17,8 @@

 import junit.framework.Test;

+import org.hibernate.jsr303.tck.tests.constraints.groups.DefaultGroupRedefinitionCompileTest; +import org.hibernate.jsr303.tck.tests.constraints.groups.DefaultGroupRedefinitionGwtTest;
 import org.hibernate.jsr303.tck.tests.constraints.groups.GroupGwtTest;
 import org.hibernate.jsr303.tck.util.TckTestSuiteWrapper;

@@ -27,6 +29,8 @@
   public static Test suite() {
     TckTestSuiteWrapper suite = new TckTestSuiteWrapper(
         "TCK for GWT Validation, constraints groups package");
+    suite.addTestSuite(DefaultGroupRedefinitionCompileTest.class);
+    suite.addTestSuite(DefaultGroupRedefinitionGwtTest.class);
     suite.addTestSuite(GroupGwtTest.class);
     return suite;
   }
=======================================
--- /trunk/user/test/org/hibernate/jsr303/tck/tests/constraints/groups/TckTestValidatorFactory.java Tue Jan 11 14:19:47 2011 +++ /trunk/user/test/org/hibernate/jsr303/tck/tests/constraints/groups/TckTestValidatorFactory.java Wed Jun 22 06:42:43 2011
@@ -1,12 +1,12 @@
 /*
  * 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
@@ -30,7 +30,9 @@
   /**
    * Marker Interface to {@link GWT#create(Class)}.
    */
- @GwtValidation(value = {Animal.class, Book.class, Order.class, User.class})
+  @GwtValidation(value = {
+      Address.class, Animal.class, Book.class, Car.class, Order.class,
+      User.class})
   public static interface GwtValidator extends Validator {
   }

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to