Package com.google.jstestdriver.model

Examples of com.google.jstestdriver.model.BasePaths


      // load all the command line plugins.
      final List<Module> pluginModules = pluginLoader.load(cmdLinePlugins);
      logger.debug("loaded plugins %s", pluginModules);

      JsTestDriverBuilder builder = new JsTestDriverBuilder();
      BasePaths basePath = cmdLineFlags.getBasePath();
      builder.addBasePaths(basePath);
      builder.setDefaultConfiguration(new DefaultConfiguration(basePath));

      builder.setConfigurationSource(cmdLineFlags.getConfigurationSource());
      builder.addPluginModules(pluginModules);
View Full Code Here


    this(flags,
         fileSet,
         serverAddress,
         captureAddress,
         outputStream,
         new BasePaths(basePath),
         DefaultConfiguration.DEFAULT_TEST_TIMEOUT,
         Collections.<FileInfo>emptyList(),
         Collections.<FileInfo>emptyList(),
         new JsonArray());
  }
View Full Code Here

      public Map<String, Void> map(@NotNull final FileContent inputData) {
        VirtualFile file = inputData.getFile();
        if (file.isValid()) {
          VirtualFile dir = file.getParent();
          if (dir.isValid()) {
            BasePaths basePaths = new BasePaths(new File(dir.getPath()));
            Reader reader = new InputStreamReader(new ByteArrayInputStream(inputData.getContent()), Charset.defaultCharset());
            try {
              return doIndexConfigFile(reader, basePaths);
            }
            catch (Exception ignored) {
View Full Code Here

    Set<FileInfo> testFiles = new LinkedHashSet<FileInfo>();
    Set<FileInfo> resolvedFilesExclude = new LinkedHashSet<FileInfo>();

    String server = "";
    DocType doctype = docTypeParser.parse("quirks");
    BasePaths basePaths = defaultBasePaths;
    long timeOut = 0;
    List<Plugin> plugins = Lists.newLinkedList();
    JsonArray gatewayConfig = new JsonArray();

    if (data.containsKey("load")) {
      resolvedFilesLoad.addAll(createFileInfos((List<String>) data
        .get("load"), false));
    }
    if (data.containsKey("test")) {
      testFiles.addAll(createFileInfos((List<String>) data
          .get("test"), false));
    }
    if (data.containsKey("exclude")) {
      resolvedFilesExclude.addAll(createFileInfos((List<String>) data
        .get("exclude"), false));
    }
    if (data.containsKey("server")) {
      server = (String) data.get("server");
    }
    if (data.containsKey("plugin")) {
      for (Map<String, String> value :
          (List<Map<String, String>>) data.get("plugin")) {
        plugins.add(new Plugin(value.get("name"), value.get("jar"),
            value.get("module"), createArgsList(value.get("args"))));
      }
    }
    if (data.containsKey("serve")) {
      Set<FileInfo> resolvedServeFiles = createFileInfos((List<String>) data.get("serve"),
        true);
      resolvedFilesLoad.addAll(resolvedServeFiles);
    }
    if (data.containsKey("doctype")) {
      doctype = docTypeParser.parse((String) data.get("doctype"));
    }
    if (data.containsKey("timeout")) {
      timeOut = (Long) data.get("timeout");
    }
    if (data.containsKey("basepath")) {
      Object rawBasePaths = data.get("basepath");
      List<String> stringBasePaths = Lists.newArrayList();
      if (rawBasePaths instanceof String) {
        stringBasePaths.add((String) data.get("basepath"));
      } else if (rawBasePaths instanceof List) {
        stringBasePaths.addAll((List<String>) rawBasePaths);
      }
      for (String stringPath : stringBasePaths) {
        File basePath = new File(stringPath);
        if (!basePath.isAbsolute()) {
          basePaths = basePaths.applyRelativePath(stringPath);
        } else {
          basePaths.add(basePath);
        }
      }
    }
    if (data.containsKey("proxy")) {
      copyDataToGatewayConfig(data, "proxy", gatewayConfig);
View Full Code Here

TOP

Related Classes of com.google.jstestdriver.model.BasePaths

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.