Package org.apache.oodt.cas.cli.option.validator

Examples of org.apache.oodt.cas.cli.option.validator.ClassExistsCmdLineOptionValidator


public class TestClassExistsCmdLineOptionValidator extends TestCase {

   public void testValidate() {
      // Check null option instance not allowed.
      try {
         new ClassExistsCmdLineOptionValidator().validate(null);
      } catch (IllegalArgumentException ignore) { /* expect throw */
      }

      // Check fail case.
      CmdLineOptionInstance instance = createOptionInstance(
            createSimpleOption("test", false), "bogus");
      assertEquals(Result.Grade.FAIL, new ClassExistsCmdLineOptionValidator()
            .validate(instance).getGrade());

      // Check pass case.
      instance = createOptionInstance(createSimpleOption("test", false),
            "java.lang.String");
      assertEquals(Result.Grade.PASS, new ClassExistsCmdLineOptionValidator()
            .validate(instance).getGrade());
   }
View Full Code Here

TOP

Related Classes of org.apache.oodt.cas.cli.option.validator.ClassExistsCmdLineOptionValidator

Copyright © 2018 www.massapicom. 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.