@Test public void testLoadFileFromAbsolutePath() throws Exception { TestInjectionManagerFactory.BootstrapResult result = TestInjectionManagerFactory.createInjectionManager(); final URL resource = getClass().getResource("testfile.xml"); final Properties props = new Properties(); final String path = new File(resource.toURI()).getAbsolutePath(); props.put("testFile", path); final WadlGeneratorDescription description = new WadlGeneratorDescription(MyWadlGenerator2.class, props); final WadlGenerator wadlGenerator = WadlGeneratorLoader.loadWadlGeneratorDescriptions(result.injectionManager, description); Assert.assertEquals(MyWadlGenerator2.class, wadlGenerator.getClass()); Assert.assertEquals(new File(resource.toURI()).getAbsolutePath(), ((MyWadlGenerator2) wadlGenerator).getTestFile() .getAbsolutePath()); }
static WadlGenerator loadWadlGeneratorDescriptions(InjectionManager injectionManager, WadlGeneratorDescription... wadlGeneratorDescriptions) throws Exception { final List<WadlGeneratorDescription> list = wadlGeneratorDescriptions != null ? Arrays.asList(wadlGeneratorDescriptions) : null; return loadWadlGeneratorDescriptions(injectionManager, list); }
WadlGeneratorLoader { static WadlGenerator loadWadlGeneratorDescriptions(InjectionManager injectionManager, WadlGeneratorDescription... wadlGeneratorDescriptions) throws Exception { final List<WadlGeneratorDescription> list = wadlGeneratorDescriptions != null ? Arrays.asList(wadlGeneratorDescriptions) : null; return loadWadlGeneratorDescriptions(injectionManager, list); } }
WadlGeneratorLoader { static WadlGenerator loadWadlGeneratorDescriptions(InjectionManager injectionManager, WadlGeneratorDescription... wadlGeneratorDescriptions) throws Exception { final List<WadlGeneratorDescription> list = wadlGeneratorDescriptions != null ? Arrays.asList(wadlGeneratorDescriptions) : null; return loadWadlGeneratorDescriptions(injectionManager, list); }  }
WadlGeneratorLoader { static WadlGenerator loadWadlGeneratorDescriptions(InjectionManager injectionManager, WadlGeneratorDescription... wadlGeneratorDescriptions) throws Exception { final List<WadlGeneratorDescription> list = wadlGeneratorDescriptions != null ? Arrays.asList(wadlGeneratorDescriptions) : null; return loadWadlGeneratorDescriptions(injectionManager, list); }   }
WadlGeneratorLoader { static WadlGenerator loadWadlGeneratorDescriptions(InjectionManager injectionManager, WadlGeneratorDescription... wadlGeneratorDescriptions) throws Exception { final List<WadlGeneratorDescription> list = wadlGeneratorDescriptions != null ? Arrays.asList(wadlGeneratorDescriptions) : null; return loadWadlGeneratorDescriptions(injectionManager, list); }    }