Examples of CommandWrapper


Examples of org.xmlBlaster.engine.admin.CommandWrapper

   }

   public void testInvalid() {
      assertEquals("Wrong node id", "heron", glob.getId());
      String cmd = null;
      CommandWrapper w = null;

      try {
         cmd = "/node/heron/";
         w = new CommandWrapper(glob, cmd);
         fail("Failed, expected exception for '" + cmd + "'");
      }
      catch(XmlBlasterException e) {
         System.out.println("OK - expected Exception: " + e.toString());
      }

      try {
         cmd = "/node/foeignNode/client/?joe";
         w = new CommandWrapper(glob, cmd);
         fail("Failed, expected exception for '" + cmd + "'");
      }
      catch(XmlBlasterException e) {
         System.out.println("OK - expected Exception: " + e.toString());
      }

      try {
         cmd = "/strangeNode/heron/client/?joe";
         w = new CommandWrapper(glob, cmd);
         fail("Failed, expected exception for '" + cmd + "'");
      }
      catch(XmlBlasterException e) {
         System.out.println("OK - expected Exception: " + e.toString());
      }

      try {
         cmd = "/node/";
         w = new CommandWrapper(glob, cmd);
         fail("Failed, expected exception for '" + cmd + "'");
      }
      catch(XmlBlasterException e) {
         System.out.println("OK - expected Exception: " + e.toString());
      }

      try {
         cmd = "/";
         w = new CommandWrapper(glob, cmd);
         fail("Failed, expected exception for '" + cmd + "'");
      }
      catch(XmlBlasterException e) {
         System.out.println("OK - expected Exception: " + e.toString());
      }

      try {
         cmd = "";
         w = new CommandWrapper(glob, cmd);
         fail("Failed, expected exception for '" + cmd + "'");
      }
      catch(XmlBlasterException e) {
         System.out.println("OK - expected Exception: " + e.toString());
      }

      try {
         cmd = null;
         w = new CommandWrapper(glob, cmd);
         fail("Failed, expected exception for '" + cmd + "'");
      }
      catch(XmlBlasterException e) {
         System.out.println("OK - expected Exception: " + e.toString());
      }

      try {
         cmd = "/////";
         w = new CommandWrapper(glob, cmd);
         fail("Failed, expected exception for '" + cmd + "'");
      }
      catch(XmlBlasterException e) {
         System.out.println("OK - expected Exception: " + e.toString());
      }
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.