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

Examples of org.apache.oodt.cas.cli.option.PrintSupportedActionsCmdLineOption


      Set<CmdLineAction> actions = Sets.newHashSet((CmdLineAction) action);

      // Setup Supported Options.
      Set<CmdLineOption> options = Sets.newHashSet();
      options.add(new HelpCmdLineOption());
      options.add(new PrintSupportedActionsCmdLineOption());
      options.add(createActionOption("action"));
      AdvancedCmdLineOption option = createAdvancedOption("message",
            createApplyToActionHandler(actionName, "setMessage"));
      ArgRegExpCmdLineOptionValidator validator = new ArgRegExpCmdLineOptionValidator();
      validator.setAllowedArgs(Lists.newArrayList(".*"));
 
View Full Code Here


         validOptions.add(new ActionCmdLineOption());
      }

      // Insure print supported actions option is present if required.
      if (findPrintSupportedActionsOption(validOptions) == null) {
         validOptions.add(new PrintSupportedActionsCmdLineOption());
      }

      // Parse command line arguments.
      return new CmdLineArgs(actionStore.loadSupportedActions(), validOptions,
            constructor.construct(
View Full Code Here

   public void testIsPrintSupportedActionsOption() {
      assertFalse(CmdLineUtils
            .isPrintSupportedActionsOption(createSimpleOption("test", false)));
      assertTrue(CmdLineUtils
            .isPrintSupportedActionsOption(new PrintSupportedActionsCmdLineOption()));
   }
View Full Code Here

      assertTrue(CmdLineUtils
            .isPrintSupportedActionsOption(new PrintSupportedActionsCmdLineOption()));
   }

   public void testFindPrintSupportedActionsOption() {
      CmdLineOption psaAction = new PrintSupportedActionsCmdLineOption();
      Set<CmdLineOption> options = Sets.newHashSet(
            (CmdLineOption) createSimpleOption("test", false),
            createSimpleOption("test2", false));

      assertNull(CmdLineUtils.findPrintSupportedActionsOption(options));
View Full Code Here

            CmdLineUtils.findPrintSupportedActionsOption(options));
   }

   public void testFindSpecifiedPrintSupportedActionsOption() {
      CmdLineOptionInstance psaAction = createOptionInstance(
            new PrintSupportedActionsCmdLineOption());
      Set<CmdLineOptionInstance> options = Sets.newHashSet(
            createOptionInstance(createSimpleOption("test", false)),
            createOptionInstance(createSimpleOption("test2", false)));

      assertNull(findSpecifiedPrintSupportedActionsOption(options));
      options.add(psaAction);
      assertEquals(psaAction,
            findSpecifiedPrintSupportedActionsOption(options));
      options.add(createOptionInstance(new PrintSupportedActionsCmdLineOption(
            "psa2", "PrintSupportedActions2", "Print Actions 2", false)));
      try {
         findSpecifiedPrintSupportedActionsOption(options);
         fail("Should have thrown IllegalArgumentException");
      } catch (IllegalArgumentException ignore) { /* expect throw */ }
View Full Code Here

      } catch (IllegalArgumentException ignore) { /* expect throw */ }
   }

   public void testIsSimpleOption() {
      assertTrue(CmdLineUtils
            .isSimpleOption(new PrintSupportedActionsCmdLineOption()));
      assertTrue(CmdLineUtils.isSimpleOption(new HelpCmdLineOption()));
      assertTrue(CmdLineUtils.isSimpleOption(createSimpleOption("Test", true)));
   }
View Full Code Here

TOP

Related Classes of org.apache.oodt.cas.cli.option.PrintSupportedActionsCmdLineOption

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.