use of org.glassfish.jersey.server.wadl.WadlGenerator in project jersey by jersey.
the class WadlGeneratorConfigurationLoaderTest method testLoadConfigInstance.
@Test
public void testLoadConfigInstance() {
final WadlGeneratorConfig config = WadlGeneratorConfig.generator(MyWadlGenerator.class).build();
final ResourceConfig resourceConfig = new ResourceConfig();
resourceConfig.property(ServerProperties.WADL_GENERATOR_CONFIG, config);
final InjectionManager locator = InjectionManagerFactory.createInjectionManager(resourceConfig.getProperties());
final WadlGenerator wadlGenerator = WadlGeneratorConfigLoader.loadWadlGeneratorsFromConfig(resourceConfig.getProperties()).createWadlGenerator(locator);
Assert.assertTrue(wadlGenerator instanceof MyWadlGenerator);
}
Aggregations