X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Forg%2Fvamsas%2Ftest%2Fsimpleclient%2FClientsFileTest.java;h=9ab68aca183173c28ca95a2285cddbf37b89de51;hb=330f112412c4d3f1540fb6d4b1d898a9bbca3b7a;hp=6ccd7364633add2a6530a5d145c91ddaaedbf804;hpb=37e460acf0f82dfb3dfeeb022a84f737759921ba;p=vamsas.git diff --git a/src/org/vamsas/test/simpleclient/ClientsFileTest.java b/src/org/vamsas/test/simpleclient/ClientsFileTest.java index 6ccd736..9ab68ac 100644 --- a/src/org/vamsas/test/simpleclient/ClientsFileTest.java +++ b/src/org/vamsas/test/simpleclient/ClientsFileTest.java @@ -10,162 +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")); - ClientsFileTest.commands.add(new String("monitor")); + 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