X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Forg%2Fvamsas%2Ftest%2Fsimpleclient%2FClientsFileTest.java;h=9ab68aca183173c28ca95a2285cddbf37b89de51;hb=349c4a3b6842fd54d791e0a92728dba294b30488;hp=a149a16917fb37d1eb8bb9cd8749e2066b9c8ba5;hpb=a0f33613dd310add2b9ece2d170e47cfadef145d;p=vamsas.git diff --git a/src/org/vamsas/test/simpleclient/ClientsFileTest.java b/src/org/vamsas/test/simpleclient/ClientsFileTest.java index a149a16..9ab68ac 100644 --- a/src/org/vamsas/test/simpleclient/ClientsFileTest.java +++ b/src/org/vamsas/test/simpleclient/ClientsFileTest.java @@ -10,118 +10,300 @@ import org.vamsas.client.simpleclient.FileWatcher; import org.vamsas.client.simpleclient.Lock; public class ClientsFileTest { + private static CommandProcessor cproc; + private static Vector commands; static { - ClientsFileTest.commands=new Vector(); + cproc = new CommandProcessor(); + ClientsFileTest.commands = new Vector(); ClientsFileTest.commands.add(new String("add")); + cproc.addCommand("add", 2, "for the Client's 'Name' and 'Version'"); ClientsFileTest.commands.add(new String("remove")); - ClientsFileTest.commands.add(new String("list")); + cproc.addCommand("remove", 3, "for the Client's 'Name', Version and URN"); + ClientsFileTest.commands.add(new String("list")); + cproc.addCommand("list", 0, "no args needed"); ClientsFileTest.commands.add(new String("clear")); - ClientsFileTest.commands.add(new String("watch")); + cproc.addCommand("clear", 0, "no args needed"); + ClientsFileTest.commands.add(new String("watch")); + cproc.addCommand("watch", 0, "no args needed"); + ClientsFileTest.commands.add(new String("monitor")); + cproc.addCommand("monitor", 2, "for the Client's 'Name' and 'Version'"); } - private static void complainArgs(int argl, int argpos, String cmd, int argneed, String msg) { - if (argl-argpos