Package org.soybeanMilk.core.os

Examples of org.soybeanMilk.core.os.HashMapObjectSource


    Map<String, Object> src=new HashMap<String, Object>();
    src.put("id", 1);
    src.put("name", "generic");
    src.put("age", 5);
   
    ObjectSource os=new HashMapObjectSource(new DefaultGenericConverter());
    os.set("arg0", src);
   
    invoke.execute(os);
   
    JavaBeanSub re=os.get("result");
   
    Assert.assertEquals(1, re.getId().intValue());
    Assert.assertEquals("generic", re.getName());
    Assert.assertEquals(5, re.getAge().intValue());
  }
View Full Code Here


    };
    Resolver rp=new ObjectResolver(new TestResolver());
   
    Invoke invoke=new Invoke("test", rp, "test1", args, RESULT_KEY);
   
    ObjectSource os=new HashMapObjectSource(new DefaultGenericConverter());
    os.set("arg0", "arg0");
    os.set("arg1", "arg1");
   
    ArgPrepareExecuteException re=null;
    try
    {
      invoke.execute(os);
View Full Code Here

    Invoke invoke=new Invoke("test", rp, "testThrow", null, RESULT_KEY);
   
    InvocationExecuteException re=null;
    try
    {
      invoke.execute(new HashMapObjectSource());
    }
    catch(InvocationExecuteException e)
    {
      re=e;
    }
View Full Code Here

  {
    Configuration cfg=new ConfigurationParser().parse("example/"+Constants.DEFAULT_CONFIG_FILE);
   
    Executor executor=new DefaultExecutor(cfg);
   
    ConvertableObjectSource os = new HashMapObjectSource();
   
    os.set("helloTo", "mars");
    os.set("helloRepeat", 3);
   
    executor.execute("helloAction", os);
  }
View Full Code Here

TOP

Related Classes of org.soybeanMilk.core.os.HashMapObjectSource

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.