Examples of NullStopWatch


Examples of com.google.jstestdriver.util.NullStopWatch

            null,
            Collections.<TestsPreProcessor> emptySet(),
            false,
            null,
            null,
            new NullStopWatch()),
            new BrowserActionExecutorAction(null, null, null, null, null, 0, null, null, null), new FailureCheckerAction(null, null), new UploadAction(null),
        new CapturedBrowsers(new BrowserIdStrategy(new MockTime(0))),
        null,
        newConfigureGatewayActionFactory(),
            null, null);
View Full Code Here

Examples of com.google.jstestdriver.util.NullStopWatch

            null,
            Collections.<TestsPreProcessor> emptySet(),
            false,
            null,
            null,
            new NullStopWatch()),
            new BrowserActionExecutorAction(null, null, null, null, null, 0, null, null, null), new FailureCheckerAction(null, null), new UploadAction(null),
            new CapturedBrowsers(new BrowserIdStrategy(new MockTime(0))),
            null,
            newConfigureGatewayActionFactory(),
            null,
View Full Code Here

Examples of com.google.jstestdriver.util.NullStopWatch

                null,
                Collections.<TestsPreProcessor>emptySet(),
                false,
                null,
                null,
                new NullStopWatch()),
            new BrowserActionExecutorAction(
                null, null, null, null, null, 0, null, null, null), new FailureCheckerAction(null, null), new UploadAction(null),
            new CapturedBrowsers(new BrowserIdStrategy(new MockTime(0))),
            null,
            newConfigureGatewayActionFactory(),
View Full Code Here

Examples of com.google.jstestdriver.util.NullStopWatch

        + "\"parameters\":[\"cmd\"]}, id=2}", "");
    server.expect("http://localhost/cmd?id=2", "{\"response\":"
        + "{\"response\":\"2\",\"browser\":{\"name\":\"browser2\"},"
        + "\"error\":\"error2\",\"executionTime\":6},\"last\":true}");

    final NullStopWatch stopWatch = new NullStopWatch();
    CommandTaskFactory commandTaskFactory =
        new CommandTaskFactory(
            new DefaultFileFilter(),
            null,
            null,
            stopWatch,
            ImmutableSet.<FileInfoScheme>of(new HttpFileInfoScheme()),
            new NullPathPrefix());
    JsTestDriverClient client = new JsTestDriverClientImpl(commandTaskFactory, "http://localhost",
        server, false, null, new NullStopWatch());
    FakeResponseStream stream = new FakeResponseStream();

    client.eval("1", stream, "cmd",
        new JstdTestCase(Collections.<FileInfo>emptyList(),
            Collections.<FileInfo>emptyList(), java.util.Collections.<FileInfo> emptyList(), null));
View Full Code Here

Examples of com.google.jstestdriver.util.NullStopWatch

  public void testGetListOfClients() throws Exception {
    MockServer server = new MockServer();
    server.expect("http://localhost/cmd?listBrowsers", "["
        + "{\"id\":0, \"name\":\"name0\", \"version\":\"ver0\", \"os\":\"os0\"},"
        + "{\"id\":1, \"name\":\"name1\", \"version\":\"ver1\", \"os\":\"os1\"}]");
    final NullStopWatch stopWatch = new NullStopWatch();
    CommandTaskFactory commandTaskFactory =
        new CommandTaskFactory(new DefaultFileFilter(), null, new Provider<HeartBeatManager>() {
          @Override
          public HeartBeatManager get() {
            return new HeartBeatManagerStub();
          }
        },
        stopWatch,
        ImmutableSet.<FileInfoScheme>of(new HttpFileInfoScheme()),
        new NullPathPrefix());
    JsTestDriverClient client = new JsTestDriverClientImpl(commandTaskFactory, "http://localhost",
        server, false, null, new NullStopWatch());
    Collection<BrowserInfo> browsersCollection = client.listBrowsers();
    List<BrowserInfo> browsers = new ArrayList<BrowserInfo>(browsersCollection);

    assertEquals(2, browsers.size());
    BrowserInfo browser0 = browsers.get(0);
View Full Code Here

Examples of com.google.jstestdriver.util.NullStopWatch

    server.expect("http://localhost/cmd?POST?{data={\"command\":\"runTests\","
        + "\"parameters\":[\"[\\\"all\\\"]\",\"false\",\"\"]}, id=" + id + "}", "");
    server.expect("http://localhost/cmd?id=1", "{\"response\":{\"response\":\"PASSED\","
        + "\"browser\":{\"name\":\"browser\"},\"error\":\"error2\",\"executionTime\":123},"
        + "\"last\":true}");
    final NullStopWatch stopWatch = new NullStopWatch();
    CommandTaskFactory commandTaskFactory =
        new CommandTaskFactory(new DefaultFileFilter(), new MockFileLoader(), new Provider<HeartBeatManager>() {
          @Override
          public HeartBeatManager get() {
            return new HeartBeatManagerStub();
          }
        }, stopWatch, ImmutableSet.<FileInfoScheme>of(new HttpFileInfoScheme()), new NullPathPrefix());
    JsTestDriverClient client = new JsTestDriverClientImpl(commandTaskFactory, "http://localhost",
        server, false, null, new NullStopWatch());
    FakeResponseStream stream = new FakeResponseStream();

    client.runAllTests("1", stream, false,
        testCase);
View Full Code Here

Examples of com.google.jstestdriver.util.NullStopWatch

    browserInfo.setUploadSize(10);
    server.expect("http://localhost/cmd?listBrowsers", gson.toJson(Lists.newArrayList(browserInfo)));
    server.expect("http://localhost/cmd?id=1", "{\"response\":{\"response\":\"PASSED\","
        + "\"browser\":{\"name\":\"browser\"},\"error\":\"error2\",\"executionTime\":123},"
        + "\"last\":true}");
    final NullStopWatch stopWatch = new NullStopWatch();
    DefaultFileFilter filter = new DefaultFileFilter();
    ImmutableSet<FileInfoScheme> schemes = ImmutableSet.<FileInfoScheme>of(new HttpFileInfoScheme());
    CommandTaskFactory commandTaskFactory =
        new CommandTaskFactory(filter,
            new MockFileLoader(),
            new Provider<HeartBeatManager>() {
          @Override
          public HeartBeatManager get() {
            return new HeartBeatManagerStub();
          }
        },
        stopWatch,
        schemes,
        new NullPathPrefix());
    JsTestDriverClient client = new JsTestDriverClientImpl(commandTaskFactory, "http://localhost",
        server, false, null, new NullStopWatch());
    FakeResponseStream stream = new FakeResponseStream();

    ArrayList<String> tests = new ArrayList<String>();

    tests.add("testCase.testFoo");
View Full Code Here

Examples of com.google.jstestdriver.util.NullStopWatch

    final FakeJsTestDriverClient.TestRun expected =
        new FakeJsTestDriverClient.TestRun(browserId, stream, tests, captureConsole);

    final RunTestsAction action =
        new RunTestsAction(new FakeResponseStreamFactory(stream), tests, captureConsole,
            Collections.<TestsPreProcessor> emptySet(), new NullStopWatch());
    final FakeJsTestDriverClient client = new FakeJsTestDriverClient(Collections.<BrowserInfo>emptyList());
    action.run(browserId, client, new RunData(
        Collections.<ResponseStream>emptyList(),
        Collections.<JstdTestCase>emptyList(),
        null), null);
View Full Code Here

Examples of com.google.jstestdriver.util.NullStopWatch

          }
        });

    final RunTestsAction action =
        new RunTestsAction(new FakeResponseStreamFactory(stream), tests, captureConsole,
            preProcessors, new NullStopWatch());
    final FakeJsTestDriverClient client = new FakeJsTestDriverClient(Collections.<BrowserInfo>emptyList());
    action.run(browserId, client, new RunData(Collections.<ResponseStream>emptyList(), Collections.<JstdTestCase>emptyList(), null), null);

    client.assertTestRun(expected);
  }
View Full Code Here

Examples of com.google.jstestdriver.util.NullStopWatch

*/
public class HttpServerTest extends TestCase {

  public void testConvertMapToUrlEncodedString() throws Exception {
    Map<String, String> map = new LinkedHashMap<String, String>(); // preserves order
    HttpServer server = new HttpServer(new NullStopWatch());

    map.put("data", "1+3");
    map.put("id", "2");
    assertEquals("data=1%2B3&id=2", server.convertParamsToString(map));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.