Пример #1
0
 @Test
 public void testClassLoaderDirFromJarWithSlash() throws Exception {
   String d = utils.getClassLoaderDir("/java/lang/Object.class");
   log.info("Found Object in: " + d);
   assertTrue(d.toLowerCase().endsWith(".jar"));
 }
Пример #2
0
 @Test(expectedExceptions = {NoSuchElementException.class})
 public void testClassLoaderDirNotFound() throws Exception {
   String d = utils.getClassLoaderDir("/somewhere/not/found/XXX.xxx");
   // above should fail
   log.warn("Uh oh found iamginary resource in: " + d);
 }
Пример #3
0
 @Test
 public void testClassLoaderDir() throws Exception {
   String d = utils.getClassLoaderDir();
   log.info("Found resource " + this + " in: " + d);
   assertTrue(new File(d + "/brooklyn/util/").exists());
 }