Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-243

TestBeanValidationIntegrationSmoke test should always catch error of validation

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 7.0.0.ER6
    • 7.0.0.DR2
    • REST
    • None

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              rsigal@redhat.com Ronald Sigal
              mkopecky@redhat.com Marek Kopecky
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: