Examples of HelpCommand


Examples of com.codahale.shore.HelpCommand

    @Test
    public void itReturnsAHelpCommandWithServerOptions() throws Exception {
      final Runnable runnable = parse("server", "--help");
      assertThat(runnable, is(HelpCommand.class));

      final HelpCommand cmd = (HelpCommand) runnable;
      assertThat(cmd.getOutputStream(), is(sameInstance((OutputStream) System.out)));
      assertThat(cmd.getText(), is(
        "usage: shoretest server -c <file> -p <port>\n" +
        "   -c, --config=FILE    Which Hibernate config file to use\n" +
        "   -h, --host=HOST      Which hostname to listen on\n" +
        "   -p, --port=PORT      Which port to bind to"
      ));
View Full Code Here

Examples of com.codahale.shore.HelpCommand

    @Test
    public void itReturnsAHelpCommandWithServerOptions() throws Exception {
      final Runnable runnable = parse("server", "--port=8080");
      assertThat(runnable, is(HelpCommand.class));

      final HelpCommand cmd = (HelpCommand) runnable;
      assertThat(cmd.getOutputStream(), is(sameInstance((OutputStream) System.out)));
      assertThat(cmd.getText(), is(
        "Error: Missing required option: c\n" +
        "\n" +
        "usage: shoretest server -c <file> -p <port>\n" +
        "   -c, --config=FILE    Which Hibernate config file to use\n" +
        "   -h, --host=HOST      Which hostname to listen on\n" +
View Full Code Here

Examples of com.codahale.shore.HelpCommand

    @Test
    public void itReturnsAHelpCommandWithServerOptions() throws Exception {
      final Runnable runnable = parse("server", "--config=src/test/resources/hsql-memory.properties");
      assertThat(runnable, is(HelpCommand.class));

      final HelpCommand cmd = (HelpCommand) runnable;
      assertThat(cmd.getOutputStream(), is(sameInstance((OutputStream) System.out)));
      assertThat(cmd.getText(), is(
        "Error: Missing required option: p\n" +
        "\n" +
        "usage: shoretest server -c <file> -p <port>\n" +
        "   -c, --config=FILE    Which Hibernate config file to use\n" +
        "   -h, --host=HOST      Which hostname to listen on\n" +
View Full Code Here

Examples of com.codahale.shore.HelpCommand

    @Test
    public void itReturnsAHelpCommandWithServerOptions() throws Exception {
      final Runnable runnable = parse("server", "--config=src/test/resources/not-here.properties", "--port=8080");
      assertThat(runnable, is(HelpCommand.class));

      final HelpCommand cmd = (HelpCommand) runnable;
      assertThat(cmd.getOutputStream(), is(sameInstance((OutputStream) System.out)));
      assertThat(cmd.getText(), is(
        "Error: Config file does not exist\n" +
        "\n" +
        "usage: shoretest server -c <file> -p <port>\n" +
        "   -c, --config=FILE    Which Hibernate config file to use\n" +
        "   -h, --host=HOST      Which hostname to listen on\n" +
View Full Code Here

Examples of com.codahale.shore.HelpCommand

    @Test
    public void itReturnsAHelpCommandWithServerOptions() throws Exception {
      final Runnable runnable = parse("server", "--ffffuuuuu");
      assertThat(runnable, is(HelpCommand.class));

      final HelpCommand cmd = (HelpCommand) runnable;
      assertThat(cmd.getOutputStream(), is(sameInstance((OutputStream) System.out)));
      assertThat(cmd.getText(), is(
        "Error: Unrecognized option: --ffffuuuuu\n" +
        "\n" +
        "usage: shoretest server -c <file> -p <port>\n" +
        "   -c, --config=FILE    Which Hibernate config file to use\n" +
        "   -h, --host=HOST      Which hostname to listen on\n" +
View Full Code Here

Examples of com.codahale.shore.HelpCommand

    @Test
    public void itReturnsAHelpCommandWithServerOptions() throws Exception {
      final Runnable runnable = parse("server", "--config=src/test/resources/hsql-memory.properties", "--port=808f0");
      assertThat(runnable, is(HelpCommand.class));

      final HelpCommand cmd = (HelpCommand) runnable;
      assertThat(cmd.getOutputStream(), is(sameInstance((OutputStream) System.out)));
      assertThat(cmd.getText(), is(
        "Error: Invalid port number\n" +
        "\n" +
        "usage: shoretest server -c <file> -p <port>\n" +
        "   -c, --config=FILE    Which Hibernate config file to use\n" +
        "   -h, --host=HOST      Which hostname to listen on\n" +
View Full Code Here

Examples of com.codahale.shore.HelpCommand

    @Test
    public void itReturnsAHelpCommandWithSchemaOptions() throws Exception {
      final Runnable runnable = parse("schema");
      assertThat(runnable, is(HelpCommand.class));

      final HelpCommand cmd = (HelpCommand) runnable;
      assertThat(cmd.getOutputStream(), is(sameInstance((OutputStream) System.out)));
      assertThat(cmd.getText(), is(
        "usage: shoretest schema -c <file> [--migration]\n" +
        "   -c, --config=FILE    Which Hibernate config file to use\n" +
        "   --migration          Generate a migration script"
      ));
    }
View Full Code Here

Examples of com.codahale.shore.HelpCommand

    @Test
    public void itReturnsAHelpCommandWithSchemaOptions() throws Exception {
      final Runnable runnable = parse("schema", "-h");
      assertThat(runnable, is(HelpCommand.class));

      final HelpCommand cmd = (HelpCommand) runnable;
      assertThat(cmd.getOutputStream(), is(sameInstance((OutputStream) System.out)));
      assertThat(cmd.getText(), is(
        "usage: shoretest schema -c <file> [--migration]\n" +
        "   -c, --config=FILE    Which Hibernate config file to use\n" +
        "   --migration          Generate a migration script"
      ));
    }
View Full Code Here

Examples of com.codahale.shore.HelpCommand

    @Test
    public void itReturnsAHelpCommandWithSchemaOptions() throws Exception {
      final Runnable runnable = parse("schema", "--help");
      assertThat(runnable, is(HelpCommand.class));

      final HelpCommand cmd = (HelpCommand) runnable;
      assertThat(cmd.getOutputStream(), is(sameInstance((OutputStream) System.out)));
      assertThat(cmd.getText(), is(
        "usage: shoretest schema -c <file> [--migration]\n" +
        "   -c, --config=FILE    Which Hibernate config file to use\n" +
        "   --migration          Generate a migration script"
      ));
    }
View Full Code Here

Examples of com.codahale.shore.HelpCommand

    @Test
    public void itReturnsAHelpCommandWithSchemaOptions() throws Exception {
      final Runnable runnable = parse("schema", "--config=src/test/resources/not-here.properties");
      assertThat(runnable, is(HelpCommand.class));

      final HelpCommand cmd = (HelpCommand) runnable;
      assertThat(cmd.getOutputStream(), is(sameInstance((OutputStream) System.out)));
      assertThat(cmd.getText(), is(
        "Error: Config file does not exist\n" +
        "\n" +
        "usage: shoretest schema -c <file> [--migration]\n" +
        "   -c, --config=FILE    Which Hibernate config file to use\n" +
        "   --migration          Generate a migration script"
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.