Package com.google.jstestdriver

Examples of com.google.jstestdriver.FlagsImpl


    code.deleteOnExit();
    return code;
  }

  private FlagsImpl createFlags() {
    FlagsImpl flags = new FlagsImpl();
    flags.setPort(8080);
    return flags;
  }
View Full Code Here


* @author corysmith
*/
public class FlagsModuleTest extends TestCase {

  public void testBindFlag() throws Exception {
    final FlagsImpl flags = new FlagsImpl();
    flags.setCaptureConsole(true);
    Injector injector = Guice.createInjector(new FlagsModule(flags));
   
    assertEquals(Boolean.valueOf(flags.getCaptureConsole()),
        injector.getInstance(Key.get(Boolean.class, Names.named("captureConsole"))));
  }
View Full Code Here

    assertEquals(Boolean.valueOf(flags.getCaptureConsole()),
        injector.getInstance(Key.get(Boolean.class, Names.named("captureConsole"))));
  }

  public void testBindNullFlag() throws Exception {
    final FlagsImpl flags = new FlagsImpl();
    flags.setTestOutput(null);
    Injector injector = Guice.createInjector(new FlagsModule(flags));
    assertEquals(flags.getServer(),
        injector.getInstance(Key.get(String.class, Names.named("testOutput"))));
  }
View Full Code Here

    assertEquals(flags.getServer(),
        injector.getInstance(Key.get(String.class, Names.named("testOutput"))));
  }

  public void testBindParameterized() throws Exception {
    final FlagsImpl flags = new FlagsImpl();
    flags.setTests(Arrays.asList("foo","bar","baz"));
    Injector injector = Guice.createInjector(new FlagsModule(flags));
    assertEquals(flags.getTests(),
        injector.getInstance(Key.get(Types.listOf(String.class), Names.named("tests"))));
  }
View Full Code Here

*/
public class CoverageModuleTest extends TestCase {
  public void testGetActionRunner() throws Exception {
    CoverageModule coverage = new CoverageModule(Collections.<String> emptyList());
    TestResultPrintingModule printStream = new TestResultPrintingModule();
    FlagsImpl flags = new FlagsImpl();
    flags.setTests(Arrays.asList("test"));
    flags.setBrowser(Arrays.asList("ff"));
    JsTestDriverModule jsTestDriverModule =
        new JsTestDriverModule(flags,
            Collections.<FileInfo> emptySet(),
            "http://127.0.0.1:42242",
            "http://127.0.0.1:42242",
View Full Code Here

    PathResolver pathResolver = new PathResolver(
      parsedConfiguration.getBasePaths(),
      Collections.<FileParsePostProcessor>emptySet(),
      new DisplayPathSanitizer()
    );
    FlagsImpl flags = new FlagsImpl();
    flags.setServer("test:1");
    Configuration resolved = parsedConfiguration.resolvePaths(pathResolver, flags);
    return (ResolvedConfiguration) resolved;
  }
View Full Code Here

    PathResolver pathResolver = new PathResolver(
      parsedConfiguration.getBasePaths(),
      Collections.<FileParsePostProcessor>emptySet(),
      new DisplayPathSanitizer()
    );
    FlagsImpl flags = new FlagsImpl();
    flags.setServer("test:1");
    ResolvedConfiguration resolvedConfiguration = (ResolvedConfiguration) parsedConfiguration.resolvePaths(pathResolver, flags);
    doPutAll(map, resolvedConfiguration.getTests());
    doPutAll(map, resolvedConfiguration.getFilesList());
    return map;
  }
View Full Code Here

TOP

Related Classes of com.google.jstestdriver.FlagsImpl

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.