Add test org.hibernate.jsr303.tck.tests.validation.graphnavigation.GraphNavigationGwtTest [JSR 303 TCK Result] 91 of 257 (35.41%) Pass with 33 Failures and 16 Errors. Review at http://gwt-code-reviews.appspot.com/1332801 Review by: rchandia@google.com git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@9645 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/user/test/com/google/gwt/validation/tck/GraphNavigationGwtSuite.java b/user/test/com/google/gwt/validation/tck/GraphNavigationGwtSuite.java new file mode 100644 index 0000000..8f16a7e --- /dev/null +++ b/user/test/com/google/gwt/validation/tck/GraphNavigationGwtSuite.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.graphnavigation.GraphNavigationGwtTest; +import org.hibernate.jsr303.tck.util.TckTestSuiteWrapper; + +/** + * Tck Tests for the {@code validation graphnavigation} package. + */ +public class GraphNavigationGwtSuite { + public static Test suite() { + TckTestSuiteWrapper suite = new TckTestSuiteWrapper( + "TCK for GWT Validation, validation graphnavigation package"); + suite.addTestSuite(GraphNavigationGwtTest.class); + return suite; + } +}
diff --git a/user/test/org/hibernate/jsr303/tck/tests/validation/graphnavigation/GraphNavigationGwtTest.java b/user/test/org/hibernate/jsr303/tck/tests/validation/graphnavigation/GraphNavigationGwtTest.java new file mode 100644 index 0000000..7ff07fe --- /dev/null +++ b/user/test/org/hibernate/jsr303/tck/tests/validation/graphnavigation/GraphNavigationGwtTest.java
@@ -0,0 +1,77 @@ +/* + * 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.graphnavigation; + +import com.google.gwt.junit.client.GWTTestCase; + +import org.hibernate.jsr303.tck.util.client.Failing; + +/** + * Test wrapper for {@link ValidationTest}. + */ +public class GraphNavigationGwtTest extends GWTTestCase { + + private final GraphNavigationTest delegate = new GraphNavigationTest(); + + @Override + public String getModuleName() { + return "org.hibernate.jsr303.tck.tests.validation.graphnavigation.TckTest"; + } + + @Failing(issue = 5946) + public void testContainedIterable() { + delegate.testContainedIterable(); + } + + @Failing(issue = 5946) + public void testContainedMap() { + delegate.testContainedMap(); + } + + @Failing(issue = 5946) + public void testContainedSet() { + delegate.testContainedSet(); + } + + @Failing(issue = 5946) + public void testFullGraphValidationBeforeNextGroupInSequence() { + delegate.testFullGraphValidationBeforeNextGroupInSequence(); + } + + @Failing(issue = 5946) + public void testGraphNavigationDeterminism() { + delegate.testGraphNavigationDeterminism(); + } + + @Failing(issue = 5946) + public void testNoEndlessLoop() { + delegate.testNoEndlessLoop(); + } + + public void testNullReferencesGetIgnored() { + delegate.testNullReferencesGetIgnored(); + } + + @Failing(issue = 5946) + public void testTypeOfContainedValueIsDeterminedAtRuntime() { + delegate.testTypeOfContainedValueIsDeterminedAtRuntime(); + } + + @Failing(issue = 5946) + public void testTypeOfContainedValuesIsDeterminedAtRuntime() { + delegate.testTypeOfContainedValuesIsDeterminedAtRuntime(); + } +}
diff --git a/user/test/org/hibernate/jsr303/tck/tests/validation/graphnavigation/TckTest.gwt.xml b/user/test/org/hibernate/jsr303/tck/tests/validation/graphnavigation/TckTest.gwt.xml new file mode 100644 index 0000000..29ee564 --- /dev/null +++ b/user/test/org/hibernate/jsr303/tck/tests/validation/graphnavigation/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.graphnavigation.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/graphnavigation/TckTestValidatorFactory.java b/user/test/org/hibernate/jsr303/tck/tests/validation/graphnavigation/TckTestValidatorFactory.java new file mode 100644 index 0000000..0bdf158 --- /dev/null +++ b/user/test/org/hibernate/jsr303/tck/tests/validation/graphnavigation/TckTestValidatorFactory.java
@@ -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.validation.graphnavigation; + +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 = { + AnimalCaretaker.class, Elephant.class, Parent.class, + SingleCage.class, Zoo.class}) + public static interface GwtValidator extends Validator { + } + + @Override + public AbstractGwtValidator createValidator() { + return GWT.create(GwtValidator.class); + } +}