Package org.moyrax.resolver

Examples of org.moyrax.resolver.ClassPathResolver


    scope = (ScriptableObject)context.initStandardObjects(shell);

    Shell.setResolver("lib", new LibraryResolver("/org/moyrax/javascript/lib"));
    // We only have the current project, so we initialize the ClassPathResolver
    // with the context class loader.
    Shell.setResolver("classpath", new ClassPathResolver(
        Thread.currentThread().getContextClassLoader()));

    /* Adds the global functions to the scope. */
    scope.defineFunctionProperties(
        shellBean.getGlobalFunctionNames().toArray(new String[] {}),
View Full Code Here


  }

  @Test
  public void testTestingClient() throws Exception {
    final TestingClient testingClient;
    testingClient = new TestingClient(runner,context, new ClassPathResolver(
        Thread.currentThread().getContextClassLoader()));

    final String baseDirectory = System.getProperty("user.dir");
    final FileSet tests = new FileSet();

    tests.setDirectory(baseDirectory + "/src/test/resources/org/moyrax/");
    tests.addInclude("**/*.html");

    context.setFiles(tests.getDirectory(),
        fileSetManager.getIncludedFiles(tests),
        fileSetManager.getExcludedFiles(tests));

    context.setLookupPackages(new String[] {
        "classpath:/org/moyrax/javascript/common/**"
    });

    context.setClassLoader(new ContextClassLoader(
        Thread.currentThread().getContextClassLoader()));

    Shell.setResolver("lib", new LibraryResolver("/org/moyrax/javascript/lib"));
    Shell.setResolver("classpath", new ClassPathResolver(
        Thread.currentThread().getContextClassLoader()));

    loadContextResources(testingClient);

    testingClient.runTests();
View Full Code Here

    }

    ContextPathBuilder.build();

    ClassLoader projectClassLoader = createProjectClassloader(project);
    ClassPathResolver resolver = new ClassPathResolver(projectClassLoader);

    env.setClassLoader(projectClassLoader);

    client = new TestingClient(runner, env, resolver);
  }
View Full Code Here

TOP

Related Classes of org.moyrax.resolver.ClassPathResolver

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.