Author: hardy.ferentschik
Date: 2009-04-27 08:42:10 -0400 (Mon, 27 Apr 2009)
New Revision: 16451
Modified:
beanvalidation/trunk/validation-tck/pom.xml
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/bootstrap/validationxml/ValidationXmlBootstrapTest.java
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/bootstrap/validationxml/validation.xml
beanvalidation/trunk/validation-tck/src/main/resources/tck-tests.xml
Log:
restructuring the tck project structure - for now we don't need the split between
api/impl
Modified: beanvalidation/trunk/validation-tck/pom.xml
===================================================================
--- beanvalidation/trunk/validation-tck/pom.xml 2009-04-27 12:10:35 UTC (rev 16450)
+++ beanvalidation/trunk/validation-tck/pom.xml 2009-04-27 12:42:10 UTC (rev 16451)
@@ -6,7 +6,7 @@
<groupId>org.hibernate.jsr303.tck</groupId>
<artifactId>jsr303-tck</artifactId>
<packaging>jar</packaging>
- <version>1.0.0-SNAPSHOT</version>
+ <version>1.0.0.Alpha1-SNAPSHOT</version>
<name>JSR-303 TCK</name>
<url>http://validator.hibernate.org</url>
@@ -36,7 +36,6 @@
</mailingList>
</mailingLists>
-
<dependencies>
<dependency>
<groupId>org.testng</groupId>
@@ -62,12 +61,12 @@
<dependency>
<groupId>org.jboss.test-harness</groupId>
<artifactId>jboss-test-harness-api</artifactId>
- <version>1.0.0.BETA2</version>
+ <version>1.0.0.Beta2</version>
</dependency>
<dependency>
<groupId>org.jboss.test-harness</groupId>
<artifactId>jboss-test-harness</artifactId>
- <version>1.0.0.BETA2</version>
+ <version>1.0.0.Beta2</version>
</dependency>
</dependencies>
@@ -201,11 +200,6 @@
<requireMavenVersion>
<version>2.0.9</version>
</requireMavenVersion>
- <requirePluginVersions>
- <unCheckedPlugins>
-
<unCheckedPlugin>org.apache.maven.plugins:maven-eclipse-plugin</unCheckedPlugin>
- </unCheckedPlugins>
- </requirePluginVersions>
</rules>
</configuration>
</execution>
@@ -268,6 +262,7 @@
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>tck-utils-impl</artifactId>
+ <version>0.9.1</version>
</dependency>
</dependencies>
<build>
@@ -324,7 +319,7 @@
<classifier>audit</classifier>
</artifact>
<artifact>
- <file>../target/coverage.html</file>
+
<file>${basedir}/target/coverage.html</file>
<type>html</type>
<classifier>coverage</classifier>
</artifact>
Modified:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/bootstrap/validationxml/ValidationXmlBootstrapTest.java
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/bootstrap/validationxml/ValidationXmlBootstrapTest.java 2009-04-27
12:10:35 UTC (rev 16450)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/bootstrap/validationxml/ValidationXmlBootstrapTest.java 2009-04-27
12:42:10 UTC (rev 16451)
@@ -20,6 +20,7 @@
import java.util.Set;
import javax.validation.ConstraintViolation;
import javax.validation.Validation;
+import javax.validation.ValidationException;
import javax.validation.Validator;
import javax.validation.ValidatorFactory;
@@ -28,9 +29,12 @@
import org.jboss.testharness.impl.packaging.Classes;
import org.jboss.testharness.impl.packaging.Resource;
import org.jboss.testharness.impl.packaging.Resources;
+import org.jboss.testharness.impl.packaging.Packaging;
+import org.jboss.testharness.impl.packaging.PackagingType;
import org.jboss.testharness.impl.packaging.IntegrationTest;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertNotNull;
+import static org.testng.Assert.fail;
import org.testng.annotations.Test;
import org.hibernate.jsr303.tck.tests.bootstrap.Person;
@@ -40,26 +44,19 @@
*/
@Artifact
@IntegrationTest
+(a)Packaging(PackagingType.WAR)
@Resources({
@Resource(destination = "WEB-INF/classes/META-INF/validation.xml", source =
"validation.xml")
})
@Classes(Person.class)
public class ValidationXmlBootstrapTest extends AbstractTest {
@Test
- public void testGetValidatorConfiguredByValidationXml() {
- ValidatorFactory factory = Validation.buildDefaultValidatorFactory();
- Validator validator = factory.getValidator();
- assertNotNull( validator, "We should be able to get a validator." );
-
- Person person = new Person();
- person.setFirstName( "John" );
-
- Set<ConstraintViolation<Person>> constraintViolations = validator.validate(
person );
- assertEquals( constraintViolations.size(), 1, "Wrong number of constraints"
);
-
- person.setLastName( "Doe" );
-
- constraintViolations = validator.validate( person );
- assertEquals( constraintViolations.size(), 0, "Wrong number of constraints"
);
+ public void testWrongProviderConfiguredInValidationXml() {
+ try {
+ ValidatorFactory factory = Validation.buildDefaultValidatorFactory();
+ fail();
+ } catch (ValidationException e) {
+
+ }
}
}
\ No newline at end of file
Modified:
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/bootstrap/validationxml/validation.xml
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/bootstrap/validationxml/validation.xml 2009-04-27
12:10:35 UTC (rev 16450)
+++
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/bootstrap/validationxml/validation.xml 2009-04-27
12:42:10 UTC (rev 16451)
@@ -2,5 +2,5 @@
<validation-config
xmlns="http://jboss.org/xml/ns/javax/validation/configuration"
xsi:schemaLocation="http://jboss.org/xml/ns/javax/validation/configu...
validation-configuration-1.0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-
<default-provider>org.hibernate.validation.engine.HibernateValidatorConfiguration</default-provider>
+ <default-provider>foo.bar.Provider</default-provider>
</validation-config>
\ No newline at end of file
Modified: beanvalidation/trunk/validation-tck/src/main/resources/tck-tests.xml
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/resources/tck-tests.xml 2009-04-27
12:10:35 UTC (rev 16450)
+++ beanvalidation/trunk/validation-tck/src/main/resources/tck-tests.xml 2009-04-27
12:42:10 UTC (rev 16451)
@@ -2,6 +2,14 @@
<suite name="JSR-303-TCK" verbose="1">
<test name="JSR-303-TCK">
+ <method-selectors>
+ <method-selector>
+ <selector-class
name="org.jboss.testharness.impl.testng.DisableIntegrationTestsMethodSelector"
/>
+ </method-selector>
+ <method-selector>
+ <selector-class
name="org.jboss.testharness.impl.testng.ExcludeIncontainerUnderInvestigationMethodSelector"
/>
+ </method-selector>
+ </method-selectors>
<packages>
<package
name="org.hibernate.jsr303.tck.tests.bootstrap.defaultprovider"/>
<package
name="org.hibernate.jsr303.tck.tests.bootstrap.validationxml"/>