Package com.google.jstestdriver.model

Examples of com.google.jstestdriver.model.NullPathPrefix


  }

  public void testParseUnparsableFailure() throws Exception {
    String failure = "some unformatted failure.";

    List<Failure> failures = new FailureParser(new NullPathPrefix()).parse(failure);

    assertEquals(failure, failures.get(0).getMessage());
  }
View Full Code Here


  private JsTestDriverServerImpl createServer(ServerListener listener) {
    server = new JsTestDriverServerImpl(4224, 4225,
        new JstdTestCaseStore(),
        browsers,
        SlaveBrowser.TIMEOUT,
        new NullPathPrefix(),
        Sets.newHashSet(listener),
        Collections.<FileInfoScheme>emptySet(),
        ExecutionType.INTERACTIVE,
        false);
    return server;
View Full Code Here

            new DefaultFileFilter(),
            null,
            null,
            stopWatch,
           ImmutableSet.<FileInfoScheme>of(new HttpFileInfoScheme()),
           new NullPathPrefix()),
        "http://localhost:4224",
        new HttpServer(new NullStopWatch()),
        false,
        null,
        new NullStopWatch());
View Full Code Here

public class DefaultConfigurationTest extends TestCase {
  public void testGetServerFromFlag() throws Exception {
    // String configServer = "configServer";
    String flagServer = "flagServer";
    final DefaultConfiguration config = new DefaultConfiguration(new BasePaths(new File(".")));
    assertEquals(flagServer, config.getServer(flagServer, -1, new NullPathPrefix()));
    final ConcretePathPrefix prefix = new ConcretePathPrefix("jstd");
    assertEquals(prefix.suffixServer(flagServer), config.getServer(flagServer, -1, prefix));
  }
View Full Code Here

      new FileInfo("/foo.js", 0, 0, false, false, null, "foo.js"),
      new FileInfo("/serveonly.js", 0, 0, false, true, null, "/serveonly.js"),
      new FileInfo("/bar.js", 0, 0, false, false, null, "bar.js"),
      new FileInfo("http://somehost/bar.js", 0, 0, false, false, null, "http://somehost/bar.js")
      ),
      new NullPathPrefix(), defaultSchemes, new Gson());

    final List<String> paths = Lists.newArrayList();

    testFileUtil.writeTestFiles(new HtmlWriter(new StringWriter(), new NullPathPrefix()) {
      @Override
      public HtmlWriter writeExternalScript(String path) {
        paths.add(path);
        return this;
      }
View Full Code Here

    Set<FileInfoScheme> defaultSchemes = Sets.<FileInfoScheme>newHashSet(new HttpFileInfoScheme());

    TestFileUtil testFileUtil = new TestFileUtil(createFileCache(
      new FileInfo("C:\\Sagitta\\Main\\Source\\Web\\Sagitta.Web.JavaScriptTests\\lib\\jasmine\\jasmine.js",
        0, 0, false, false, null, "/test/lib/jasmine/jasmine.js")),
      new NullPathPrefix(), defaultSchemes, new Gson());

    StringWriter writer = new StringWriter();
    HtmlWriter htmlWriter = new HtmlWriter(writer, new NullPathPrefix());
    testFileUtil.writeTestFiles(htmlWriter, TESTCASE_ID);
    htmlWriter.flush();
    assertTrue(writer.toString().contains("C:\\\\\\\\Sagitta\\\\\\\\Main\\\\\\\\" +
        "Source\\\\\\\\Web\\\\\\\\Sagitta.Web.JavaScriptTests\\\\\\\\lib\\\\\\\\" +
        "jasmine\\\\\\\\jasmine.js"));
View Full Code Here

      new FileInfo("/serveonly.js", 0, 0, false, true, null, "/serveonly.js"),
      new FileInfo("/bar.js", 0, 0, false, false, null, "bar.js"),
      new FileInfo(unhandledPath, 0, 0, false, false, null, unhandledPath),
      new FileInfo("http://somehost/bar.js", 0, 0, false, false, null, "http://somehost/bar.js")
      ),
      new NullPathPrefix(), schemes, new Gson());

    final List<String> paths = Lists.newArrayList();

    testFileUtil.writeTestFiles(new HtmlWriter(new StringWriter(), new NullPathPrefix()) {
      @Override
      public HtmlWriter writeExternalScript(String path) {
        paths.add(path);
        return this;
      }
View Full Code Here

*/
public class StandaloneRunnerPageTest extends TestCase {
  public void testRenderWithPrefix() throws Exception {
    new PrefixTester().testPrefixes(new BrowserControlledRunnerPage(
        new TestFileUtil(new JstdTestCaseStore(),
            new NullPathPrefix(),
            Collections.<FileInfoScheme>emptySet(), new Gson())));
  }
View Full Code Here

* @author Cory Smith (corbinrsmith@gmail.com)
*/
public class RunnerPageTest extends TestCase {
  public void testRenderWithPrefix() throws Exception {
    new PrefixTester().testPrefixes(new RunnerPage(new TestFileUtil(new JstdTestCaseStore(),
        new NullPathPrefix(), Collections.<FileInfoScheme>emptySet(), new Gson()), false));
  }
View Full Code Here

  }

  public void testWriteResources() throws IOException {
    Map<String, FileInfo> files = Maps.newHashMap();
    FileInfo fileInfo = new FileInfo("foo.js", -1, -1, false, false, "", "foo.js");
    NullPathPrefix prefix = new NullPathPrefix();
    Set<FileInfoScheme> schemes = Collections.<FileInfoScheme>emptySet();
    JstdTestCaseStore store = new JstdTestCaseStore();
    String id = "foo";
    store.addCase(new JstdTestCase(Collections.<FileInfo>emptyList(), Lists.newArrayList(fileInfo),
        Collections.<FileInfo>emptyList(), id));
View Full Code Here

TOP

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

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.