TestBeanValidationIntegrationSmoke test should always catch error of validation
Maven project: jaxrs/providers/resteasy-hibernatevalidator-provider
Class: org.jboss.resteasy.test.plugins.validation.smoke.TestBeanValidationIntegrationSmoke
This class contains many parts of code like this:
try { input.setAge(1000); resource.insert(input); } catch (ClientResponseFailure e) { Assert.assertEquals(400, e.getResponse().getStatus()); }
Assert.fail() should be added at the end of try block (exception in resource.insert(input); should be thrown everytime):
try { input.setAge(1000); resource.insert(input); Assert.fail("Validation error."); } catch (ClientResponseFailure e) { Assert.assertEquals(400, e.getResponse().getStatus()); }
But shouldRespectInsertGroup test from TestBeanValidationIntegrationSmoke.java fails with this modification, so validation in this test is incorrect.
- clones
-
RESTEASY-1165 TestBeanValidationIntegrationSmoke test should always catch error of validation
- Closed
- is blocked by
-
JBEAP-3248 Upgrade Resteasy to release 3.0.16.Final
- Closed