Skip to content

Commit

Permalink
Cleanup tests
Browse files Browse the repository at this point in the history
  • Loading branch information
electrum committed Nov 4, 2014
1 parent fcf696f commit d05113f
Show file tree
Hide file tree
Showing 31 changed files with 394 additions and 374 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.airlift.airline;

@Command(name="ArgsRequiredWrongMain")
@Command(name = "ArgsRequiredWrongMain")
public class ArgsRequiredWrongMain
{
@Arguments(required = true)
Expand Down
20 changes: 12 additions & 8 deletions src/test/java/io/airlift/airline/Git.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,22 @@ public static void main(String... args)
CliBuilder<Runnable> builder = Cli.<Runnable>builder("git")
.withDescription("the stupid content tracker")
.withDefaultCommand(Help.class)
.withCommands(Help.class,
Add.class);
.withCommand(Help.class)
.withCommand(Add.class);

builder.withGroup("remote")
.withDescription("Manage set of tracked repositories")
.withDefaultCommand(RemoteShow.class)
.withCommands(RemoteShow.class,
RemoteAdd.class);
.withCommand(RemoteShow.class)
.withCommand(RemoteAdd.class);

Cli<Runnable> gitParser = builder.build();

gitParser.parse(args).run();
}

public static class GitCommand implements Runnable
public static class GitCommand
implements Runnable
{
@Option(type = GLOBAL, name = "-v", description = "Verbose mode")
public boolean verbose;
Expand All @@ -39,7 +40,8 @@ public void run()
}

@Command(name = "add", description = "Add file contents to the index")
public static class Add extends GitCommand
public static class Add
extends GitCommand
{
@Arguments(description = "Patterns of files to be added")
public List<String> patterns;
Expand All @@ -49,7 +51,8 @@ public static class Add extends GitCommand
}

@Command(name = "show", description = "Gives some information about the remote <name>")
public static class RemoteShow extends GitCommand
public static class RemoteShow
extends GitCommand
{
@Option(name = "-n", description = "Do not query remote heads")
public boolean noQuery;
Expand All @@ -59,7 +62,8 @@ public static class RemoteShow extends GitCommand
}

@Command(name = "add", description = "Adds a remote")
public static class RemoteAdd extends GitCommand
public static class RemoteAdd
extends GitCommand
{
@Option(name = "-t", description = "Track only a specific branch")
public String branch;
Expand Down
Loading

0 comments on commit d05113f

Please sign in to comment.