Revision: 10497
Author:   gwt.mirror...@gmail.com
Date:     Fri Aug  5 12:18:39 2011
Log:      Add Traversable Resolver and UnknownProviderBootstrapCompile tests
[JSR 303 TCK Result] 154 of 257 (59.92%) Pass with 26 Failures and 7 Errors.
Review at http://gwt-code-reviews.appspot.com/1510804

Review by: rchan...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=10497

Added:
/trunk/user/test/com/google/gwt/validation/tck/TraversableResolverGwtSuite.java
 /trunk/user/test/org/hibernate/jsr303/tck/tests/traversableresolver
/trunk/user/test/org/hibernate/jsr303/tck/tests/traversableresolver/TckTest.gwt.xml /trunk/user/test/org/hibernate/jsr303/tck/tests/traversableresolver/TckTestValidatorFactory.java /trunk/user/test/org/hibernate/jsr303/tck/tests/traversableresolver/TraversableResolverGwtTest.java /trunk/user/test/org/hibernate/jsr303/tck/tests/validation/UnknownProviderBootstrapCompileTest.gwt.xml /trunk/user/test/org/hibernate/jsr303/tck/tests/validation/UnknownProviderBootstrapCompileTest.java
Modified:
 /trunk/user/test/com/google/gwt/validation/tck/ValidationGwtSuite.java

=======================================
--- /dev/null
+++ /trunk/user/test/com/google/gwt/validation/tck/TraversableResolverGwtSuite.java Fri Aug 5 12:18:39 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.traversableresolver.TraversableResolverGwtTest;
+import org.hibernate.jsr303.tck.util.TckTestSuiteWrapper;
+
+/**
+ * Tck Tests for the {@code traversableresolver} package.
+ */
+public class TraversableResolverGwtSuite {
+  public static Test suite() {
+    TckTestSuiteWrapper suite = new TckTestSuiteWrapper(
+        "TCK for GWT Validation, traversableresolver package");
+    suite.addTestSuite(TraversableResolverGwtTest.class);
+    return suite;
+  }
+}
=======================================
--- /dev/null
+++ /trunk/user/test/org/hibernate/jsr303/tck/tests/traversableresolver/TckTest.gwt.xml Fri Aug 5 12:18:39 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.traversableresolver.TckTestValidatorFactory">
+    <when-type-is class="javax.validation.ValidatorFactory"/>
+  </replace-with>
+</module>
=======================================
--- /dev/null
+++ /trunk/user/test/org/hibernate/jsr303/tck/tests/traversableresolver/TckTestValidatorFactory.java Fri Aug 5 12:18:39 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.traversableresolver;
+
+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;
+
+/**
+ * Test {@link AbstractGwtValidatorFactory} for {@link TraversableResolverTest}.
+ */
+public final class TckTestValidatorFactory extends AbstractGwtValidatorFactory {
+  /**
+   * Marker Interface to {@link GWT#create(Class)}.
+   */
+  @GwtValidation(value = {
+      Jacket.class, Person.class, Suit.class, Trousers.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/traversableresolver/TraversableResolverGwtTest.java Fri Aug 5 09:08:32 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.traversableresolver;
+
+import com.google.gwt.junit.client.GWTTestCase;
+
+import org.hibernate.jsr303.tck.util.client.Failing;
+
+/**
+ * Test wrapper for {@link TraversableResolverTest}.
+ */
+public class TraversableResolverGwtTest extends GWTTestCase {
+ private final TraversableResolverTest delegate = new TraversableResolverTest();
+
+  @Override
+  public String getModuleName() {
+    return "org.hibernate.jsr303.tck.tests.traversableresolver.TckTest";
+  }
+
+  @Failing(issue = 6544)
+  public void testCorrectNumberOfCallsToIsReachableAndIsCascadable() {
+    delegate.testCorrectNumberOfCallsToIsReachableAndIsCascadable();
+  }
+
+  @Failing(issue = 6544)
+  public void testCustomTraversableResolverViaConfiguration() {
+    delegate.testCustomTraversableResolverViaConfiguration();
+  }
+
+  public void testResolverExceptionsGetWrappedInValidationException() {
+    delegate.testResolverExceptionsGetWrappedInValidationException();
+  }
+
+}
=======================================
--- /dev/null
+++ /trunk/user/test/org/hibernate/jsr303/tck/tests/validation/UnknownProviderBootstrapCompileTest.gwt.xml Fri Aug 5 09:08:32 2011
@@ -0,0 +1,29 @@
+<?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>
+  <!--  specifically don't inherit hibernate -->
+  <inherits name="com.google.gwt.user.User" />
+  <inherits name="org.hibernate.jsr303.tck.Jsr303Tck" />
+  <source path="">
+    <include name="*.java" />
+    <exclude name="*CompileTest.java" />
+  </source>
+ <replace-with class="org.hibernate.jsr303.tck.tests.validation.TckTestValidatorFactory">
+    <when-type-is class="javax.validation.ValidatorFactory"/>
+  </replace-with>
+</module>
=======================================
--- /dev/null
+++ /trunk/user/test/org/hibernate/jsr303/tck/tests/validation/UnknownProviderBootstrapCompileTest.java Fri Aug 5 09:08:32 2011
@@ -0,0 +1,39 @@
+/*
+ * 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;
+
+import org.hibernate.jsr303.tck.util.TckCompileTestCase;
+import org.hibernate.jsr303.tck.util.client.Failing;
+import org.hibernate.jsr303.tck.util.client.NonTckTest;
+
+import javax.validation.ValidationException;
+
+/**
+ * Test wrapper for {@link UnknownProviderBootstrapTest} methods that are
+ * suppose to fail to compile.
+ */
+public class UnknownProviderBootstrapCompileTest extends TckCompileTestCase {
+
+  @NonTckTest
+  public void testThereMustBeOnePassingTest() {}
+
+  @Failing(issue = 6573)
+  public void testUnknownProviderThrowsValidationException() {
+ assertValidatorFailsToCompile(TckTestValidatorFactory.GwtValidator.class,
+        ValidationException.class,
+        "TODO(nchalko): get this to actually fail in the test.");
+  }
+}
=======================================
--- /trunk/user/test/com/google/gwt/validation/tck/ValidationGwtSuite.java Tue Feb 22 10:50:07 2011 +++ /trunk/user/test/com/google/gwt/validation/tck/ValidationGwtSuite.java Fri Aug 5 09:08:32 2011
@@ -18,6 +18,7 @@
 import junit.framework.Test;

 import org.hibernate.jsr303.tck.tests.validation.PropertyPathGwtTest;
+import org.hibernate.jsr303.tck.tests.validation.UnknownProviderBootstrapCompileTest;
 import org.hibernate.jsr303.tck.tests.validation.ValidateCompileTest;
 import org.hibernate.jsr303.tck.tests.validation.ValidateGwtTest;
 import org.hibernate.jsr303.tck.tests.validation.ValidatePropertyGwtTest;
@@ -33,6 +34,7 @@
     TckTestSuiteWrapper suite = new TckTestSuiteWrapper(
         "TCK for GWT Validation, validation package");
     suite.addTestSuite(PropertyPathGwtTest.class);
+    suite.addTestSuite(UnknownProviderBootstrapCompileTest.class);
     suite.addTestSuite(ValidateGwtTest.class);
     suite.addTestSuite(ValidateCompileTest.class);
     suite.addTestSuite(ValidatePropertyGwtTest.class);

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

Reply via email to