Package com.google.jstestdriver.util

Examples of com.google.jstestdriver.util.DisplayPathSanitizer


    ConfigurationParser parser = new YamlParser();

    Configuration config =
        parser.parse(new InputStreamReader(bais), null).resolvePaths(
            new PathResolver(tmpDirs, Collections.<FileParsePostProcessor>emptySet(),
                new DisplayPathSanitizer()), createFlags());

    Set<FileInfo> files = config.getFilesList();
    List<FileInfo> listFiles = new ArrayList<FileInfo>(files);

    assertEquals(3, files.size());
View Full Code Here


    ConfigurationParser parser = new YamlParser();
   
    Configuration config =
      parser.parse(new InputStreamReader(bais), null).resolvePaths(
          new PathResolver(tmpDirs, Collections.<FileParsePostProcessor>emptySet(),
              new DisplayPathSanitizer()), createFlags());
   
    Set<FileInfo> files = config.getFilesList();
    List<FileInfo> listFiles = new ArrayList<FileInfo>(files);

    assertEquals(3, files.size());
View Full Code Here

    ConfigurationParser parser = new YamlParser();
   
    Configuration config =
        parser.parse(new InputStreamReader(bais), null).resolvePaths(
            new PathResolver(new BasePaths(codeDir),
                Collections.<FileParsePostProcessor>emptySet(), new DisplayPathSanitizer()),
            createFlags());

    Set<FileInfo> files = config.getFilesList();
    List<FileInfo> listFiles = new ArrayList<FileInfo>(files);
   
View Full Code Here

      " - test/test2.js";
    ByteArrayInputStream bais = new ByteArrayInputStream(configFile.getBytes());
    ConfigurationParser parser = new YamlParser();
   
    Configuration config = parser.parse(new InputStreamReader(bais), null).resolvePaths(
        new PathResolver(tmpDirs, Collections.<FileParsePostProcessor> emptySet(), new DisplayPathSanitizer()), createFlags());
   
    Set<FileInfo> files = config.getFilesList();
    List<FileInfo> listFiles = Lists.newArrayList(files);
   
    assertEquals(1, files.size());
View Full Code Here

                  processed.add(new FileInfo(fileInfo.getFilePath(),
                      code.lastModified(), -1, false, true, null, fileInfo.getDisplayPath()));
                }
                return processed;
              }
            }), new DisplayPathSanitizer()), createFlags());
    Set<FileInfo> files = config.getFilesList();
    List<FileInfo> listFiles = new ArrayList<FileInfo>(files);

    assertEquals(1, files.size());
    assertTrue(listFiles.get(0).getFilePath().replace(File.separatorChar, '/').endsWith("code/code.js"));
View Full Code Here

    String configFile = "load:\n - code/*.js";
    ByteArrayInputStream bais = new ByteArrayInputStream(configFile.getBytes());
    ConfigurationParser parser = new YamlParser();

    Configuration config = parser.parse(new InputStreamReader(bais), null).resolvePaths(
        new PathResolver(tmpDirs, Collections.<FileParsePostProcessor> emptySet(), new DisplayPathSanitizer()), createFlags());
    Set<FileInfo> files = config.getFilesList();
    List<FileInfo> listFiles = new ArrayList<FileInfo>(files);

    assertEquals(2, files.size());
    assertTrue(listFiles.get(0).getFilePath().replace(File.separatorChar, '/').endsWith("code/code.js"));
View Full Code Here

            " - test/dir1/dir2/test2.js";
      ByteArrayInputStream bais = new ByteArrayInputStream(configFile.getBytes());
      ConfigurationParser parser = new YamlParser();

      Configuration config = parser.parse(new InputStreamReader(bais), null).resolvePaths(
          new PathResolver(tmpDirs, Collections.<FileParsePostProcessor> emptySet(), new DisplayPathSanitizer()), createFlags());
      Set<FileInfo> files = config.getFilesList();
      List<FileInfo> listFiles = new ArrayList<FileInfo>(files);

      assertEquals(3, files.size());
      assertTrue(listFiles.get(0).getFilePath().replace(File.separatorChar, '/').endsWith("code/dir1/dir2/code.js"));
View Full Code Here

      + "exclude:\n" + "- code/code2.js\n" + "- test/test2.js";
    ByteArrayInputStream bais = new ByteArrayInputStream(configFile.getBytes());
    ConfigurationParser parser = new YamlParser();

    Configuration config = parser.parse(new InputStreamReader(bais), null)
        .resolvePaths(new PathResolver(tmpDirs, Collections.<FileParsePostProcessor> emptySet(), new DisplayPathSanitizer()), createFlags());
    Set<FileInfo> files = config.getFilesList();
    List<FileInfo> listFiles = new ArrayList<FileInfo>(files);

    assertEquals(3, files.size());
    assertTrue(listFiles.get(0).getFilePath().replace(File.separatorChar, '/').endsWith("code/code.js"));
View Full Code Here

    ByteArrayInputStream bais = new ByteArrayInputStream(configFile.getBytes());
    ConfigurationParser parser = new YamlParser();
    try {
      parser.parse(new InputStreamReader(bais), null).resolvePaths(
          new PathResolver(tmpDirs, Collections.<FileParsePostProcessor>emptySet(),
              new DisplayPathSanitizer()), createFlags());
      fail("should have thrown an exception due to patching a non-existant file");
    } catch (IllegalStateException e) {
      // pass
    }
  }
View Full Code Here

    ConfigurationParser parser = new YamlParser();

    Configuration config =
        parser.parse(new InputStreamReader(bais), null).resolvePaths(
            new PathResolver(tmpDirs, Collections.<FileParsePostProcessor>emptySet(),
                new DisplayPathSanitizer()), createFlags());
    List<Plugin> plugins = config.getPlugins();
    assertEquals(expected, plugins.get(0));
  }
View Full Code Here

TOP

Related Classes of com.google.jstestdriver.util.DisplayPathSanitizer

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.