Package org.apache.oodt.cas.cli.action.store.spring

Examples of org.apache.oodt.cas.cli.action.store.spring.SpringCmdLineActionStore


   public void testLoadSupportedOptions() throws CmdLineActionStoreException,
         CmdLineOptionStoreException {
      SpringCmdLineOptionStore optionStore = new SpringCmdLineOptionStore(
            SPRING_OPTION_CONFIG);
      Set<CmdLineOption> options = optionStore.loadSupportedOptions();
      SpringCmdLineActionStore actionStore = new SpringCmdLineActionStore(
            SPRING_ACTION_CONFIG);
      Set<CmdLineAction> actions = actionStore.loadSupportedActions();

      // Check that all options were loaded.
      assertEquals(2, options.size());

      // Load and verify printHelloWorld was loaded correctly.
View Full Code Here


   public void testHandlers() throws CmdLineActionStoreException,
         CmdLineOptionStoreException {
      SpringCmdLineOptionStore store = new SpringCmdLineOptionStore(
            SPRING_OPTION_CONFIG);
      Set<CmdLineOption> options = store.loadSupportedOptions();
      SpringCmdLineActionStore actionStore = new SpringCmdLineActionStore(
            SPRING_ACTION_CONFIG);
      Set<CmdLineAction> actions = actionStore.loadSupportedActions();

      // Load PrintHelloWorldAction
      PrintMessageAction printHelloWorldAction = (PrintMessageAction) findAction(
            "PrintMessageAction", actions);
      AdvancedCmdLineOption printHelloWorldOption = (AdvancedCmdLineOption) getOptionByName(
View Full Code Here

public class TestSpringCmdLineActionStore extends TestCase {

   private static final String SPRING_CONFIG = "src/testdata/cmd-line-actions.xml";

   public void testActionNamesAutoSet() {
      SpringCmdLineActionStore store = new SpringCmdLineActionStore(
            SPRING_CONFIG);
      ApplicationContext appContext = store.getApplicationContext();
      @SuppressWarnings("unchecked")
      Map<String, CmdLineAction> actionsMap = appContext
            .getBeansOfType(CmdLineAction.class);
      for (Entry<String, CmdLineAction> entry : actionsMap.entrySet()) {
         assertEquals(entry.getKey(), entry.getValue().getName());
View Full Code Here

         assertEquals(entry.getKey(), entry.getValue().getName());
      }
   }

   public void testApplicationContextAutoSet() throws CmdLineActionStoreException {
      SpringCmdLineActionStore store = new SpringCmdLineActionStore(
            SPRING_CONFIG);
      TestSetContextInjectTypeAction action = (TestSetContextInjectTypeAction) findAction(
            "TestSetContextInjectAction", store.loadSupportedActions());
      assertEquals(action.getContext(), store.getApplicationContext());
   }
View Full Code Here

            "TestSetContextInjectAction", store.loadSupportedActions());
      assertEquals(action.getContext(), store.getApplicationContext());
   }

   public void testLoadSupportedActions() throws CmdLineActionStoreException {
      SpringCmdLineActionStore store = new SpringCmdLineActionStore(
            SPRING_CONFIG);
      Set<CmdLineAction> actions = store.loadSupportedActions();

      // Check that all actions were loaded.
      assertEquals(3, actions.size());

      // Load and verify PrintMessageAction was loaded correctly.
View Full Code Here

TOP

Related Classes of org.apache.oodt.cas.cli.action.store.spring.SpringCmdLineActionStore

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.