Revision: 9621
Author: [email protected]
Date: Wed Jan 26 09:30:56 2011
Log: Add more TCK tests

[JSR 303 TCK Result] 90 of 257 (35.02%) Pass with 29 Failures and 12 Errors.

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

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

Added:
/trunk/user/test/org/hibernate/jsr303/tck/tests/metadata/ConstraintDescriptorGwtTest.java /trunk/user/test/org/hibernate/jsr303/tck/tests/metadata/ElementDescriptorGwtTest.java /trunk/user/test/org/hibernate/jsr303/tck/tests/metadata/PropertyDescriptorGwtTest.java /trunk/user/test/org/hibernate/jsr303/tck/tests/validation/ValidateGwtTest.java
Modified:
 /trunk/user/test/com/google/gwt/validation/tck/MetadataGwtSuite.java
 /trunk/user/test/com/google/gwt/validation/tck/ValidationGwtSuite.java
/trunk/user/test/org/hibernate/jsr303/tck/tests/metadata/TckTestValidatorFactory.java /trunk/user/test/org/hibernate/jsr303/tck/tests/validation/TckTestValidatorFactory.java /trunk/user/test/org/hibernate/jsr303/tck/tests/validation/ValidatePropertyGwtTest.java

=======================================
--- /dev/null
+++ /trunk/user/test/org/hibernate/jsr303/tck/tests/metadata/ConstraintDescriptorGwtTest.java Wed Jan 26 09:30:56 2011
@@ -0,0 +1,80 @@
+/*
+ * 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.metadata;
+
+import com.google.gwt.junit.client.GWTTestCase;
+
+import org.hibernate.jsr303.tck.util.client.Failing;
+
+/**
+ * Test wrapper for {@link ConstraintDescriptorTest}.
+ */
+public class ConstraintDescriptorGwtTest extends GWTTestCase {
+ private final ConstraintDescriptorTest delegate = new ConstraintDescriptorTest();
+
+  @Override
+  public String getModuleName() {
+    return "org.hibernate.jsr303.tck.tests.metadata.TckTest";
+  }
+
+  @Failing(issue = 5931)
+  public void testAnnotationAndMapParametersReflectParameterOverriding() {
+    delegate.testAnnotationAndMapParametersReflectParameterOverriding();
+  }
+
+  @Failing(issue = 5931)
+  public void testComposingConstraints() {
+    delegate.testComposingConstraints();
+  }
+
+  @Failing(issue = 5931)
+  public void testComposingConstraintsPayload() {
+    delegate.testComposingConstraintsPayload();
+  }
+
+  public void testDefaultGroupIsReturnedIfNoGroupSpecifiedInDeclaration() {
+    delegate.testDefaultGroupIsReturnedIfNoGroupSpecifiedInDeclaration();
+  }
+
+  @Failing(issue = 5931)
+  public void testEmptyComposingConstraints() {
+    delegate.testEmptyComposingConstraints();
+  }
+
+  public void testGetAttributesFromConstraintDescriptor() {
+    delegate.testGetAttributesFromConstraintDescriptor();
+  }
+
+  public void testGetGroups() {
+    delegate.testGetGroups();
+  }
+
+  public void testGetGroupsOnInterface() {
+    delegate.testGetGroupsOnInterface();
+  }
+
+  public void testGetGroupsWithImplicitGroup() {
+    delegate.testGetGroupsWithImplicitGroup();
+  }
+
+  public void testPayload() {
+    delegate.testPayload();
+  }
+
+  public void testReportAsSingleViolation() {
+    delegate.testReportAsSingleViolation();
+  }
+}
=======================================
--- /dev/null
+++ /trunk/user/test/org/hibernate/jsr303/tck/tests/metadata/ElementDescriptorGwtTest.java Wed Jan 26 09:30:56 2011
@@ -0,0 +1,70 @@
+/*
+ * 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.metadata;
+
+import com.google.gwt.junit.client.GWTTestCase;
+
+import org.hibernate.jsr303.tck.util.client.Failing;
+
+/**
+ * Test wrapper for {@link ElementDescriptorTest}.
+ */
+public class ElementDescriptorGwtTest extends GWTTestCase {
+ private final ElementDescriptorTest delegate = new ElementDescriptorTest();
+
+  @Override
+  public String getModuleName() {
+    return "org.hibernate.jsr303.tck.tests.metadata.TckTest";
+  }
+
+  @Failing(issue = 5932)
+  public void testDeclaredOn() {
+    delegate.testDeclaredOn();
+  }
+
+  public void testGetConstraintDescriptors() {
+    delegate.testGetConstraintDescriptors();
+  }
+
+  public void testGetElementClass() {
+    delegate.testGetElementClass();
+  }
+
+  public void testHasConstraints() {
+    delegate.testHasConstraints();
+  }
+
+  @Failing(issue = 5932)
+  public void testLookingAt() {
+    delegate.testLookingAt();
+  }
+
+  @Failing(issue = 5932)
+  public void testUnorderedAndMatchingGroups() {
+    delegate.testUnorderedAndMatchingGroups();
+  }
+
+  @Failing(issue = 5932)
+  public void testUnorderedAndMatchingGroupsWithDefaultGroupOverriding() {
+    delegate.testUnorderedAndMatchingGroupsWithDefaultGroupOverriding();
+  }
+
+  @Failing(issue = 5932)
+  public void testUnorderedAndMatchingGroupsWithInheritance() {
+    delegate.testUnorderedAndMatchingGroupsWithInheritance();
+  }
+
+}
=======================================
--- /dev/null
+++ /trunk/user/test/org/hibernate/jsr303/tck/tests/metadata/PropertyDescriptorGwtTest.java Wed Jan 26 09:30:56 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.metadata;
+
+import com.google.gwt.junit.client.GWTTestCase;
+
+/**
+ * Test wrapper for {@link PropertyDescriptorTest}.
+ */
+public class PropertyDescriptorGwtTest extends GWTTestCase {
+ private final PropertyDescriptorTest delegate = new PropertyDescriptorTest();
+
+  @Override
+  public String getModuleName() {
+    return "org.hibernate.jsr303.tck.tests.metadata.TckTest";
+  }
+
+  public void testIsCascaded() {
+    delegate.testIsCascaded();
+  }
+
+  public void testIsNotCascaded() {
+    delegate.testIsNotCascaded();
+  }
+
+  public void testPropertyName() {
+    delegate.testPropertyName();
+  }
+}
=======================================
--- /dev/null
+++ /trunk/user/test/org/hibernate/jsr303/tck/tests/validation/ValidateGwtTest.java Wed Jan 26 09:30:56 2011
@@ -0,0 +1,114 @@
+/*
+ * 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.client.Failing;
+
+import javax.validation.ValidationException;
+
+/**
+ * Test wrapper for {@link ValidateTest}.
+ */
+public class ValidateGwtTest extends AbstractValidationTest {
+
+  private final ValidateTest delegate = new ValidateTest();
+
+  public void testConstraintDescriptorWithoutExplicitGroup() {
+    delegate.testConstraintDescriptorWithoutExplicitGroup();
+  }
+
+  public void testConstraintViolation() {
+    delegate.testConstraintViolation();
+  }
+
+  @Failing(issue = 5930)
+  public void testGraphValidationWithArray() {
+    delegate.testGraphValidationWithArray();
+  }
+
+  @Failing(issue = 5930)
+  public void testGraphValidationWithList() {
+    delegate.testGraphValidationWithList();
+  }
+
+  @Failing(issue = 5930)
+  public void testMultipleConstraintViolationOfDifferentTypes() {
+    delegate.testMultipleConstraintViolationOfDifferentTypes();
+  }
+
+  public void testMultipleViolationOfTheSameType() {
+    delegate.testMultipleViolationOfTheSameType();
+  }
+
+  public void testNullParameterToGetConstraintsForClass() {
+    try {
+      delegate.testNullParameterToGetConstraintsForClass();
+      fail("Expected a " + IllegalArgumentException.class);
+    } catch (IllegalArgumentException ignore) {
+      // Expected
+    }
+  }
+
+  public void testObjectTraversion() {
+    delegate.testObjectTraversion();
+  }
+
+  public void testOnlyFirstGroupInSequenceGetEvaluated() {
+    delegate.testOnlyFirstGroupInSequenceGetEvaluated();
+  }
+
+  public void testPassingNullAsGroup() {
+    delegate.testPassingNullAsGroup();
+  }
+
+ public void testUnexpectedExceptionsInValidateGetWrappedInValidationExceptions() {
+    try {
+ delegate.testUnexpectedExceptionsInValidateGetWrappedInValidationExceptions();
+      fail("Expected a " + ValidationException.class);
+    } catch (ValidationException ignore) {
+      // Expected
+    }
+  }
+
+  @Failing(issue = 5929)
+  public void testValidatedPropertyDoesNotFollowJavaBeansConvention() {
+    delegate.testValidatedPropertyDoesNotFollowJavaBeansConvention();
+  }
+
+  public void testValidateWithNullGroup() {
+    try {
+      delegate.testValidateWithNullGroup();
+      fail("Expected a " + IllegalArgumentException.class);
+    } catch (IllegalArgumentException ignore) {
+      // Expected
+    }
+  }
+
+  public void testValidateWithNullValue() {
+    try {
+      delegate.testValidateWithNullValue();
+      fail("Expected a " + IllegalArgumentException.class);
+    } catch (IllegalArgumentException ignore) {
+      // Expected
+    }
+  }
+
+  @Failing(issue = 5930)
+  public void testValidationIsPolymorphic() {
+    delegate.testValidationIsPolymorphic();
+  }
+
+}
=======================================
--- /trunk/user/test/com/google/gwt/validation/tck/MetadataGwtSuite.java Tue Jan 11 14:19:47 2011 +++ /trunk/user/test/com/google/gwt/validation/tck/MetadataGwtSuite.java Wed Jan 26 09:30:56 2011
@@ -20,6 +20,9 @@
 import junit.framework.Test;

 import org.hibernate.jsr303.tck.tests.metadata.BeanDescriptorGwtTest;
+import org.hibernate.jsr303.tck.tests.metadata.ConstraintDescriptorGwtTest;
+import org.hibernate.jsr303.tck.tests.metadata.ElementDescriptorGwtTest;
+import org.hibernate.jsr303.tck.tests.metadata.PropertyDescriptorGwtTest;
 import org.hibernate.jsr303.tck.util.TckTestSuiteWrapper;

 /**
@@ -30,6 +33,9 @@
     TckTestSuiteWrapper suite = new TckTestSuiteWrapper(
         "TCK for GWT Validation, metadata package");
     suite.addTestSuite(BeanDescriptorGwtTest.class);
+    suite.addTestSuite(ConstraintDescriptorGwtTest.class);
+    suite.addTestSuite(ElementDescriptorGwtTest.class);
+    suite.addTestSuite(PropertyDescriptorGwtTest.class);
     return suite;
   }
 }
=======================================
--- /trunk/user/test/com/google/gwt/validation/tck/ValidationGwtSuite.java Tue Jan 11 14:19:47 2011 +++ /trunk/user/test/com/google/gwt/validation/tck/ValidationGwtSuite.java Wed Jan 26 09:30:56 2011
@@ -18,6 +18,7 @@
 import junit.framework.Test;

 import org.hibernate.jsr303.tck.tests.validation.PropertyPathGwtTest;
+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.ValidationGwtTest;
@@ -31,6 +32,7 @@
     TckTestSuiteWrapper suite = new TckTestSuiteWrapper(
         "TCK for GWT Validation, validation package");
     suite.addTestSuite(PropertyPathGwtTest.class);
+    suite.addTestSuite(ValidateGwtTest.class);
     suite.addTestSuite(ValidatePropertyGwtTest.class);
     suite.addTestSuite(ValidateValueGwtTest.class);
     suite.addTestSuite(ValidationGwtTest.class);
=======================================
--- /trunk/user/test/org/hibernate/jsr303/tck/tests/metadata/TckTestValidatorFactory.java Tue Jan 11 14:19:47 2011 +++ /trunk/user/test/org/hibernate/jsr303/tck/tests/metadata/TckTestValidatorFactory.java Wed Jan 26 09:30:56 2011
@@ -31,8 +31,8 @@
    * Marker Interface to {@link GWT#create(Class)}.
    */
   @GwtValidation(value = {
-      Account.class, Customer.class, Man.class, Order.class,
-      UnconstraintEntity.class})
+      Account.class, Customer.class, Man.class, Order.class, Person.class,
+      SubClass.class, SuperClass.class, UnconstraintEntity.class})
   public static interface GwtValidator extends Validator {
   }

=======================================
--- /trunk/user/test/org/hibernate/jsr303/tck/tests/validation/TckTestValidatorFactory.java Wed Jan 19 06:58:02 2011 +++ /trunk/user/test/org/hibernate/jsr303/tck/tests/validation/TckTestValidatorFactory.java Wed Jan 26 09:30:56 2011
@@ -22,6 +22,7 @@

 import org.hibernate.jsr303.tck.tests.validation.PropertyPathTest.ActorDB;
import org.hibernate.jsr303.tck.tests.validation.PropertyPathTest.VerySpecialClass;
+import org.hibernate.jsr303.tck.tests.validation.ValidateTest.Car;

 import javax.validation.Validator;

@@ -36,8 +37,8 @@
   @GwtValidation(value = {
       // Actor must be after its subclasses
ActorDB.class, ActorArrayBased.class, ActorListBased.class, Actor.class, - Address.class, BadlyBehavedEntity.class, Customer.class, Engine.class,
-      Order.class, VerySpecialClass.class})
+      Address.class, BadlyBehavedEntity.class, Car.class,
+      Customer.class, Engine.class, Order.class, VerySpecialClass.class})
   public static interface GwtValidator extends Validator {
   }

=======================================
--- /trunk/user/test/org/hibernate/jsr303/tck/tests/validation/ValidatePropertyGwtTest.java Tue Jan 25 11:20:03 2011 +++ /trunk/user/test/org/hibernate/jsr303/tck/tests/validation/ValidatePropertyGwtTest.java Wed Jan 26 09:30:56 2011
@@ -26,15 +26,18 @@

   private final ValidatePropertyTest delegate = new ValidatePropertyTest();

-  public void testIllegalArgumentExceptionIsThrownForNullValue() {
+  // Add Property Prefix so test name is unique in the suite.
+  public void testPropertyIllegalArgumentExceptionIsThrownForNullValue() {
     delegate.testIllegalArgumentExceptionIsThrownForNullValue();
   }

-  public void testPassingNullAsGroup() {
+  // Add Property Prefix so test name is unique in the suite.
+  public void testPropertyPassingNullAsGroup() {
     delegate.testPassingNullAsGroup();
   }

- public void testUnexpectedExceptionsInValidatePropertyGetWrappedInValidationExceptions() {
+  // Add Property Prefix so test name is unique in the suite.
+ public void testPropertyUnexpectedExceptionsInValidatePropertyGetWrappedInValidationExceptions() {
     // Wrap the test to catch the @Test expected exception.
     try {
delegate.testUnexpectedExceptionsInValidatePropertyGetWrappedInValidationExceptions();

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

Reply via email to