Пример #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));
   }
 }
Пример #2
0
 @Override
 public String getScript(String name) {
   RaptureScript script = api.getScript().getScript(name);
   return script == null ? null : script.getScript();
 }