3 Replies Latest reply: May 6, 2012 3:02 PM by Dan Allen RSS

Jersey descriptors in test package and REST testing

Dan Allen Master

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.