Skip to content

Commit

Permalink
BVTCK-32 Enabling tests fixed in RI (HV-664, HV-681)
Browse files Browse the repository at this point in the history
  • Loading branch information
gunnarmorling committed Jan 28, 2013
1 parent 6521115 commit a42be46
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 33 deletions.
Expand Up @@ -105,8 +105,7 @@ public void testReturnValueConstraintAddedInSubClass() throws Exception {
assertCorrectConstraintTypes( violations, NotNull.class );
}

//Fails due to wrong return value node name
@Test(groups = Groups.FAILING_IN_RI)
@Test
@SpecAssertion(section = "4.5.5", id = "c")
public void testReturnValueMarkedAsCascadedInInterfaceImplementation() throws Exception {
Object object = new CalendarServiceImplementation();
Expand Down Expand Up @@ -165,8 +164,7 @@ public void testReturnValueConstraintFromInterfacesAndImplementationAddUp() thro
);
}

//Fails due to wrong return value node name
@Test(groups = Groups.FAILING_IN_RI)
@Test
@SpecAssertion(section = "4.5.5", id = "c")
public void testReturnValueMarkedAsCascadedInSubClass() throws Exception {
Object object = new CalendarServiceSubClass();
Expand Down Expand Up @@ -227,8 +225,7 @@ public void testParameterConstraintMarkedAsCascadedAtConstructorInSubClass() thr
);
}

//Fails due to wrong return type node name
@Test(groups = Groups.FAILING_IN_RI)
@Test
@SpecAssertion(section = "4.5.5", id = "e")
public void testReturnValueConstraintAddedToConstructorInSubClass() throws Exception {
//Constructor<?> constructor = CalendarServiceSubClass.class.getConstructor( String.class );
Expand All @@ -250,8 +247,7 @@ public void testReturnValueConstraintAddedToConstructorInSubClass() throws Excep
);
}

//Fails due to wrong return type node name
@Test(groups = Groups.FAILING_IN_RI)
@Test
@SpecAssertion(section = "4.5.5", id = "e")
public void testReturnValueMarkedAsCascadedAtConstructorInSuperAndSubClass() throws Exception {
//Constructor<?> constructor = CalendarServiceSubClass.class.getConstructor( long.class );
Expand Down
Expand Up @@ -76,8 +76,7 @@ public void setupValidator() {
executableValidator = TestUtil.getValidatorUnderTest().forExecutables();
}

//fails on RI due to wrong return value node name
@Test(groups = Groups.FAILING_IN_RI)
@Test
@SpecAssertions({
@SpecAssertion(section = "5.1.2", id = "j"),
@SpecAssertion(section = "5.1.2", id = "k")
Expand Down Expand Up @@ -128,8 +127,7 @@ public void testTwoViolations() throws Exception {
);
}

//fails on RI due to wrong return value node name
@Test(groups = Groups.FAILING_IN_RI)
@Test
@SpecAssertion(section = "5.1.2", id = "k")
public void testTwoConstraintsOfSameType() throws Exception {
Constructor<Customer> constructor = Customer.class.getConstructor( CharSequence.class );
Expand Down Expand Up @@ -252,8 +250,7 @@ public void testNullPassedForConstructorCausesException() throws Exception {
);
}

//fails due to https://hibernate.onjira.com/browse/HV-681
@Test(expectedExceptions = IllegalArgumentException.class, groups = Groups.FAILING_IN_RI)
@Test(expectedExceptions = IllegalArgumentException.class)
@SpecAssertion(section = "5.1.2", id = "l")
public void testNullPassedForReturnValueCausesException() throws Exception {
Constructor<Customer> constructor = Customer.class.getConstructor();
Expand All @@ -278,8 +275,7 @@ public void testNullPassedForGroupsCausesException() throws Exception {
);
}

//fails due to https://hibernate.onjira.com/browse/HV-681
@Test(expectedExceptions = IllegalArgumentException.class, groups = Groups.FAILING_IN_RI)
@Test(expectedExceptions = IllegalArgumentException.class)
@SpecAssertion(section = "5.1.2", id = "l")
public void testNullPassedAsSingleGroupCausesException() throws Exception {
Constructor<Customer> constructor = Customer.class.getConstructor();
Expand Down
Expand Up @@ -42,7 +42,6 @@
import org.hibernate.beanvalidation.tck.tests.methodvalidation.model.Customer.Basic;
import org.hibernate.beanvalidation.tck.tests.methodvalidation.model.Customer.Extended;
import org.hibernate.beanvalidation.tck.tests.methodvalidation.model.Email;
import org.hibernate.beanvalidation.tck.util.Groups;
import org.hibernate.beanvalidation.tck.util.TestUtil;
import org.hibernate.beanvalidation.tck.util.shrinkwrap.WebArchiveBuilder;

Expand Down Expand Up @@ -77,8 +76,7 @@ public void setupValidator() {
executableValidator = TestUtil.getValidatorUnderTest().forExecutables();
}

//fails on RI due to wrong return value node name
@Test(groups = Groups.FAILING_IN_RI)
@Test
@SpecAssertions({
@SpecAssertion(section = "5.1.2", id = "d"),
@SpecAssertion(section = "5.1.2", id = "e")
Expand All @@ -103,8 +101,7 @@ public void testOneViolation() throws Exception {
assertCorrectPathDescriptorKinds( violations, kinds( Kind.METHOD, Kind.RETURN_VALUE ) );
}

//fails on RI due to wrong return value node name
@Test(groups = Groups.FAILING_IN_RI)
@Test
@SpecAssertion(section = "5.1.2", id = "e")
public void testTwoViolations() throws Exception {
String methodName = "getFirstName";
Expand Down Expand Up @@ -134,8 +131,7 @@ public void testTwoViolations() throws Exception {
);
}

//fails on RI due to wrong return value node name
@Test(groups = Groups.FAILING_IN_RI)
@Test
@SpecAssertion(section = "5.1.2", id = "e")
public void testTwoConstraintsOfSameType() throws Exception {
String methodName = "getLastName";
Expand Down Expand Up @@ -181,8 +177,7 @@ public void testNoViolations() throws Exception {
assertCorrectNumberOfViolations( violations, 0 );
}

//fails on RI due to wrong return value node name
@Test(groups = Groups.FAILING_IN_RI)
@Test
@SpecAssertion(section = "5.1.2", id = "e")
public void testValidationWithGroup() throws Exception {
String methodName = "getLastName";
Expand Down Expand Up @@ -211,8 +206,7 @@ public void testValidationWithGroup() throws Exception {
assertCorrectPathDescriptorKinds( violations, kinds( Kind.METHOD, Kind.RETURN_VALUE ) );
}

//fails on RI due to wrong return value node name
@Test(groups = Groups.FAILING_IN_RI)
@Test
@SpecAssertion(section = "5.1.2", id = "e")
public void testValidationWithSeveralGroups() throws Exception {
String methodName = "getAllData";
Expand Down Expand Up @@ -262,8 +256,7 @@ public void testUnexpectedType() throws Exception {
executableValidator.validateReturnValue( object, method, returnValue );
}

//fails due to https://hibernate.onjira.com/browse/HV-681
@Test(expectedExceptions = IllegalArgumentException.class, groups = Groups.FAILING_IN_RI)
@Test(expectedExceptions = IllegalArgumentException.class)
@SpecAssertion(section = "5.1.2", id = "f")
public void testNullPassedForObjectCausesException() throws Exception {
Object object = null;
Expand Down Expand Up @@ -306,8 +299,7 @@ public void testNullPassedForGroupsCausesException() throws Exception {
);
}

//fails due to https://hibernate.onjira.com/browse/HV-681
@Test(expectedExceptions = IllegalArgumentException.class, groups = Groups.FAILING_IN_RI)
@Test(expectedExceptions = IllegalArgumentException.class)
@SpecAssertion(section = "5.1.2", id = "f")
public void testNullPassedAsSingleGroupCausesException() throws Exception {
Object object = new Customer();
Expand Down
Expand Up @@ -138,8 +138,7 @@ public void testGroupConversionIsAppliedOnProperty() {
);
}

//fails as "$retval is used as return value node name
@Test(groups = Groups.FAILING_IN_RI)
@Test
@SpecAssertion(section = "4.4.5", id = "b")
public void testGroupConversionIsAppliedOnMethodReturnValue() throws Exception {
//given
Expand Down

0 comments on commit a42be46

Please sign in to comment.