Exemplo n.º 1
0
 private void testExpandWildcardUri(String uriPrefix) {
   Kernel.getKernel().restart();
   Kernel.initBootstrap();
   int num = 9;
   for (int i = 0; i < num; i++) {
     Kernel.getJar().putJar(ContextFactory.getKernelUser(), uriPrefix + i, new byte[0]);
   }
   KernelScript ks = new KernelScript();
   ks.setCallingContext(ContextFactory.getKernelUser());
   List<String> ret = JarUtils.expandWildcardUri(ks, uriPrefix + "*");
   assertFalse(ret.isEmpty());
   for (int i = 0; i < num; i++) {
     assertEquals(new RaptureURI(uriPrefix + i, Scheme.JAR).toString(), ret.get(i));
   }
 }
Exemplo n.º 2
0
 @Override
 public String getScript(String name) {
   RaptureScript script = api.getScript().getScript(name);
   return script == null ? null : script.getScript();
 }