diff --git a/tests/src/main/java/org/hibernate/beanvalidation/tck/tests/constraints/inheritance/method/validdeclarations/ValidMethodConstraintDeclarationTest.java b/tests/src/main/java/org/hibernate/beanvalidation/tck/tests/constraints/inheritance/method/validdeclarations/ValidMethodConstraintDeclarationTest.java index 73cdacf3..ef17fc0a 100644 --- a/tests/src/main/java/org/hibernate/beanvalidation/tck/tests/constraints/inheritance/method/validdeclarations/ValidMethodConstraintDeclarationTest.java +++ b/tests/src/main/java/org/hibernate/beanvalidation/tck/tests/constraints/inheritance/method/validdeclarations/ValidMethodConstraintDeclarationTest.java @@ -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(); @@ -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(); @@ -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 ); @@ -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 ); diff --git a/tests/src/main/java/org/hibernate/beanvalidation/tck/tests/methodvalidation/ValidateConstructorReturnValueTest.java b/tests/src/main/java/org/hibernate/beanvalidation/tck/tests/methodvalidation/ValidateConstructorReturnValueTest.java index 0d88e6fa..ed0e1194 100644 --- a/tests/src/main/java/org/hibernate/beanvalidation/tck/tests/methodvalidation/ValidateConstructorReturnValueTest.java +++ b/tests/src/main/java/org/hibernate/beanvalidation/tck/tests/methodvalidation/ValidateConstructorReturnValueTest.java @@ -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") @@ -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 constructor = Customer.class.getConstructor( CharSequence.class ); @@ -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 constructor = Customer.class.getConstructor(); @@ -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 constructor = Customer.class.getConstructor(); diff --git a/tests/src/main/java/org/hibernate/beanvalidation/tck/tests/methodvalidation/ValidateReturnValueTest.java b/tests/src/main/java/org/hibernate/beanvalidation/tck/tests/methodvalidation/ValidateReturnValueTest.java index 348d7504..8a1bcd92 100644 --- a/tests/src/main/java/org/hibernate/beanvalidation/tck/tests/methodvalidation/ValidateReturnValueTest.java +++ b/tests/src/main/java/org/hibernate/beanvalidation/tck/tests/methodvalidation/ValidateReturnValueTest.java @@ -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; @@ -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") @@ -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"; @@ -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"; @@ -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"; @@ -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"; @@ -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; @@ -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(); diff --git a/tests/src/main/java/org/hibernate/beanvalidation/tck/tests/validation/groupconversion/GroupConversionValidationTest.java b/tests/src/main/java/org/hibernate/beanvalidation/tck/tests/validation/groupconversion/GroupConversionValidationTest.java index f7b6708e..23a3b202 100644 --- a/tests/src/main/java/org/hibernate/beanvalidation/tck/tests/validation/groupconversion/GroupConversionValidationTest.java +++ b/tests/src/main/java/org/hibernate/beanvalidation/tck/tests/validation/groupconversion/GroupConversionValidationTest.java @@ -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