Package com.google.jstestdriver.util

Examples of com.google.jstestdriver.util.NullStopWatch


                                                   Set<ActionListProcessor> processors,
                                                   String testOutput,
                                                   XmlPrinter xmlPrinter) {
    ActionFactory actionFactory =
        new ActionFactory(null, Collections.<TestsPreProcessor>emptySet(), false,
            null, null, new NullStopWatch());
    return new DefaultActionListProvider(
        tests,
        Collections.<String>emptyList(),
        reset,
        Collections.<String>emptyList(),
View Full Code Here


    return loadFileParams.toString();
  }

  private CommandTask createCommandTask(MockServer server, Map<String, String> params, FakeResponseStream stream,
      MockFileLoader fileLoader, boolean upload) {
    NullStopWatch stopWatch = new NullStopWatch();
    ImmutableSet<FileInfoScheme> schemes = ImmutableSet.<FileInfoScheme>of(new HttpFileInfoScheme());
    NullPathPrefix prefix = new NullPathPrefix();
    DefaultFileFilter filter = new DefaultFileFilter();
    String baseUrl = "http://localhost";
    CommandTask task = new CommandTask(stream,
View Full Code Here

  public void testCreateCommandQueueFromFlags() throws Exception {
    List<Action> actions =  new LinkedList<Action>();
    TestRanAction action =  new TestRanAction();

    actions.add(action);
    ActionRunner runner = new ActionRunner(actions, new NullStopWatch(),
        new RunDataFactory(
            Collections.<FileInfo>emptySet(),
            Collections.<FileInfo>emptyList(),
            Collections.<ResourcePreProcessor>emptySet(),
            Collections.<FileInfo>emptyList(), new JstdTestCaseFactory(Collections.<JstdTestCaseProcessor>emptySet(),
              Collections.<ResourceDependencyResolver>emptySet(), new NullStopWatch()), new NullStopWatch()));

    runner.runActions();
    assertTrue(action.actionRan());
  }
View Full Code Here

    assertEquals(5, browsers.getBrowsers().get(0).getId().intValue());
    assertEquals(new Long(5), listener.captured.getId());
  }

  public void testListBrowsers() throws Exception {
    final NullStopWatch stopWatch = new NullStopWatch();
    JsTestDriverClient client = new JsTestDriverClientImpl(
        new CommandTaskFactory(
            new DefaultFileFilter(),
            null,
            null,
            stopWatch,
           ImmutableSet.<FileInfoScheme>of(new HttpFileInfoScheme()),
           new NullPathPrefix()),
        "http://localhost:4224",
        new HttpServer(new NullStopWatch()),
        false,
        null,
        new NullStopWatch());

    TestListener listener = new TestListener();
    createServer(listener);
    server.start();
    Collection<BrowserInfo> browsers = client.listBrowsers();
View Full Code Here

    JsonObject entry = new JsonObject();
    entry.addProperty("matcher", "/*");
    entry.addProperty("server", "http://localhost:8888/");
    JsonArray gatewayConfig = new JsonArray();
    gatewayConfig.add(entry);
    final HttpServer client = new HttpServer(new NullStopWatch());
    client.postJson("http://localhost:4224/jstd/gateway", gatewayConfig);
    SocketConnector connector = new SocketConnector();
    connector.setPort(8888);
    org.mortbay.jetty.Server dummy = new org.mortbay.jetty.Server();
    dummy.addConnector(connector);
View Full Code Here

    }

    @Override
    public BrowserControl create(BrowserRunner runner, String serverAddress,
        List<JstdTestCase> testCases) {
      return new BrowserControl(runner, serverAddress, new NullStopWatch(), client,
          testCases, 1000);
    }
View Full Code Here

  private void runCaptureUrlTest(String browserId, String serverAddress,
      final FakeJsTestDriverClient client, final FakeBrowserRunner runner,
      final FakeBrowserActionRunner browserActionRunner, int browserTimeout) throws Exception {
    final BrowserCallable<Collection<ResponseStream>> browserRunner =
        new BrowserCallable<Collection<ResponseStream>>(browserActionRunner, browserId,
            new BrowserControl(runner, serverAddress, new NullStopWatch(), client,
                Collections.<JstdTestCase>emptyList(), browserTimeout));
    browserRunner.call();
  }
View Full Code Here

    browserRunner.call();
  }

  private static final class FakeBrowserActionRunner extends BrowserActionRunner {
    public FakeBrowserActionRunner() {
      super(null, null, null, new NullStopWatch(), null, null);
    }
View Full Code Here

    FileInfo two = new FileInfo("two", -1, -1, false, false, null, "two");
   
    final JstdTestCaseFactory testCaseFactory =
        new JstdTestCaseFactory(
            Sets.<JstdTestCaseProcessor>newHashSet(),
            Collections.<ResourceDependencyResolver>emptySet(), new NullStopWatch());
    final List<JstdTestCase> testCases = testCaseFactory.createCases(
        Collections.<FileInfo>emptyList(),
        Lists.newArrayList(one),
        Lists.newArrayList(two));
    final RunData runData = new RunData(Lists.newArrayList(streamOne), testCases, testCaseFactory);
View Full Code Here

    FileInfo testTwo = new FileInfo("twoTest.js", 1234, -1, false, false, null, "twoTest.js");
    FileInfo testThree = new FileInfo("threeTest.js", 1234, -1, false, false, null, "threeTest.js");
    List<FileInfo> tests = Lists.newArrayList(testOne, testTwo, testThree);
    final JstdTestCaseFactory testCaseFactory = new JstdTestCaseFactory(
        Collections.<JstdTestCaseProcessor> emptySet(),
        Collections.<ResourceDependencyResolver>emptySet(), new NullStopWatch());

    List<JstdTestCase> testCases = testCaseFactory.createCases(
        Collections.<FileInfo>emptyList(), files, tests);
    assertEquals(1, testCases.size());
    JstdTestCase jstdTestCase = testCases.get(0);
View Full Code Here

TOP

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

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.