3 Replies Latest reply on May 6, 2012 3:02 PM by dan.j.allen

    Jersey descriptors in test package and REST testing

    dan.j.allen

      From the article Writing lightweight REST integration tests with the Jersey Test Framework, I noticed that Jersey has a webapp descriptor builder in the test package. This is obviously an opportunity to show where ShrinkWrap descriptors can be generally applicable.

       

      WebAppDescriptor.Builder()
          .initParam(WebComponent.RESOURCE_CONFIG_CLASS, ClassNamesResourceConfig.class.getName())
          .initParam(ClassNamesResourceConfig.PROPERTY_CLASSNAMES,
              TodoResource.class.getName() + ";" +
              MockTodoServiceProvider.class.getName() + ";" +
              NotFoundMapper.class.getName()).build();
      

       

      Here's the JavaDoc for WebAppDescriptor.

       

      This article also reminds us that the Arquillian REST extension prototype is probably worth converting to an official module at this point. I'll follow-up on that in a thread in the Arquillian dev forums.