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

Examples of org.apache.oodt.cas.cli.option.handler.SetJavaPropertiesHandler


*/
public class TestSetJavaPropertiesHandler extends TestCase {

   public void testSettingOfProperties() {
      String property = "test.property";
      SetJavaPropertiesHandler handler = new SetJavaPropertiesHandler();
      handler.setPropertyNames(Lists.newArrayList(property));
      CmdLineOption option = createAdvancedOption("testOption", handler);
      CmdLineOptionInstance optionInstance = createOptionInstance(option, "Hello", "World");

      assertNull(System.getProperty(property));
     
      handler.handleOption(null, optionInstance);
      assertEquals("Hello World", System.getProperty(property));

      option.setType(List.class);
      handler.handleOption(null, optionInstance);
      assertEquals("Hello,World", System.getProperty(property));
   }
View Full Code Here

TOP

Related Classes of org.apache.oodt.cas.cli.option.handler.SetJavaPropertiesHandler

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.