Skip to content

Commit

Permalink
BVTCK-42 deleted VersionNotGivenTest, since it is ony a indirect prof…
Browse files Browse the repository at this point in the history
…f of the assertion. Assertion needs to be marked as non testable
  • Loading branch information
hferentschik committed Mar 4, 2013
1 parent 7eec4e5 commit 954ea76
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 160 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package org.hibernate.beanvalidation.tck.tests.xmlconfiguration.versioning;

import javax.validation.ValidationException;
import javax.validation.Validator;

import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.testng.Arquillian;
Expand All @@ -33,26 +32,24 @@
* @author Gunnar Morling
*/
@SpecVersion(spec = "beanvalidation", version = "1.1.0")
public class MappingVersioningTest extends Arquillian {
public class UnknownVersionInMappingXmlTest extends Arquillian {

private static final String MAPPING_FILE = "order-constraints-UnknownVersionTest.xml";
private static final String MAPPING_FILE = "UnknownVersionInMappingXmlTest.xml";

@Deployment
public static WebArchive createTestArchive() {
return new WebArchiveBuilder()
.withTestClassPackage( MappingVersioningTest.class )
.withTestClassPackage( UnknownVersionInMappingXmlTest.class )
.withResource( MAPPING_FILE )
.build();
}

@Test(expectedExceptions = ValidationException.class)
@SpecAssertion(section = "8.2", id = "c")
public void testConstraintMappingWithUnknownSchemaVersion() {
Validator validator = TestUtil
.getConfigurationUnderTest()
.addMapping( MappingVersioningTest.class.getResourceAsStream( MAPPING_FILE ) )
TestUtil.getConfigurationUnderTest()
.addMapping( UnknownVersionInMappingXmlTest.class.getResourceAsStream( MAPPING_FILE ) )
.buildValidatorFactory()
.getValidator();
validator.validate( new User() );
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package org.hibernate.beanvalidation.tck.tests.xmlconfiguration.versioning;

import javax.validation.ValidationException;
import javax.validation.Validator;

import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.testng.Arquillian;
Expand All @@ -33,20 +32,19 @@
* @author Gunnar Morling
*/
@SpecVersion(spec = "beanvalidation", version = "1.1.0")
public class UnknownVersionTest extends Arquillian {
public class UnknownVersionInValidationXmlTest extends Arquillian {

@Deployment
public static WebArchive createTestArchive() {
return new WebArchiveBuilder()
.withTestClassPackage( UnknownVersionTest.class )
.withValidationXml( "validation-UnknownVersionTest.xml" )
.withTestClass( UnknownVersionInValidationXmlTest.class )
.withValidationXml( "validation-UnknownVersionInValidationXmlTest.xml" )
.build();
}

@Test(expectedExceptions = ValidationException.class)
@SpecAssertion(section = "8.1.4", id = "c")
public void testValidationXmlWithUnknownSchemaVersion() {
Validator validator = TestUtil.getValidatorUnderTest();
validator.validate( new User() );
TestUtil.getValidatorUnderTest();
}
}

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 954ea76

Please sign in to comment.