Examples of KeyArg


Examples of org.soybeanMilk.core.exe.support.KeyArg

      else if("null".equals(strArg))
      {
        re=new ValueArg(null, argType);
      }
      else
        re=new KeyArg(strArg, argType);
    }
   
    return re;
  }
View Full Code Here

Examples of org.soybeanMilk.core.exe.support.KeyArg

 
  @Test
  public void execute() throws Exception
  {
    Arg[] args=new Arg[]{
        new KeyArg("arg0"),
        new KeyArg("arg1"),
    };
    Resolver rp=new ObjectResolver(new TestResolver());
   
    Invoke invoke=new Invoke("test", rp, "test1", args, RESULT_KEY);
   
View Full Code Here

Examples of org.soybeanMilk.core.exe.support.KeyArg

 
  @Test
  public void execute_dynamic_objectSourceResolver() throws Exception
  {
    Arg[] args=new Arg[]{
        new KeyArg("arg0"),
        new KeyArg("arg1"),
    };
   
    Resolver rp=new ObjectSourceResolver("objectSourceResolver");
   
    Invoke invoke=new Invoke("test", rp, "test1", args, RESULT_KEY);
View Full Code Here

Examples of org.soybeanMilk.core.exe.support.KeyArg

 
  @Test
  public void execute_dynamic_factoryResolver() throws Exception
  {
    Arg[] args=new Arg[]{
        new KeyArg("arg0"),
        new KeyArg("arg1"),
    };
   
    ResolverObjectFactory rof=new DefaultResolverObjectFactory();
    rof.addResolverObject("factoryResolver", new TestResolver());
   
View Full Code Here

Examples of org.soybeanMilk.core.exe.support.KeyArg

  @Test
  public void execute_dynamic_dynamicResolver_objectSource() throws Exception
  {
    Arg[] args=new Arg[]{
        new KeyArg("arg0"),
        new KeyArg("arg1"),
    };
   
    ResolverObjectFactory rof=new DefaultResolverObjectFactory();
    rof.addResolverObject("dynamicResolver", new TestResolver());
   
View Full Code Here

Examples of org.soybeanMilk.core.exe.support.KeyArg

 
  @Test
  public void execute_dynamic_dynamicResolver_factory() throws Exception
  {
    Arg[] args=new Arg[]{
        new KeyArg("arg0"),
        new KeyArg("arg1"),
    };
   
    ResolverObjectFactory rof=new DefaultResolverObjectFactory();
    rof.addResolverObject("dynamicResolver", new TestResolver());
   
View Full Code Here

Examples of org.soybeanMilk.core.exe.support.KeyArg

 
  @Test
  public void execute_dynamic_dynamicResolver_none() throws Exception
  {
    Arg[] args=new Arg[]{
        new KeyArg("arg0"),
        new KeyArg("arg1"),
    };
   
    ResolverObjectFactory rof=new DefaultResolverObjectFactory();
   
    Resolver rp=new DynamicResolver(new FactoryResolver(rof, "dynamicResolver"), new ObjectSourceResolver("dynamicResolver"));
View Full Code Here

Examples of org.soybeanMilk.core.exe.support.KeyArg

  @Test
  public void execute_similarMethod_keyArg_typeSet() throws Exception
  {
    {
      Arg[] args=new Arg[]{
          new KeyArg("arg", Double.class),
        };
     
      Resolver rp=new ObjectResolver(new TestResolver());
     
      Invoke invoke=new Invoke("test", rp, "sameMethod", args, RESULT_KEY);
     
      ObjectSource os=new HashMapObjectSource(new DefaultGenericConverter());
      os.set("arg", "33");
     
      invoke.execute(os);
     
      Assert.assertEquals("Double", os.get(RESULT_KEY));
    }
   
    {
      Arg[] args=new Arg[]{
          new KeyArg("arg", Integer.class),
        };
     
      Resolver rp=new ObjectResolver(new TestResolver());
     
      Invoke invoke=new Invoke("test", rp, "sameMethod", args, RESULT_KEY);
View Full Code Here

Examples of org.soybeanMilk.core.exe.support.KeyArg

 
  @Test
  public void execute_similarMethod_keyArg_typeNotSet() throws Exception
  {
    Arg[] args=new Arg[]{
        new KeyArg("arg"),
      };
   
    Resolver rp=new ObjectResolver(new TestResolver());
   
    Invoke invoke=new Invoke("test", rp, "sameMethod", args, RESULT_KEY);
View Full Code Here

Examples of org.soybeanMilk.core.exe.support.KeyArg

  @Test
  public void execute_genericMethod_customTypeInKeyArg() throws Exception
  {
    Arg[] args=new Arg[]
        {
          new KeyArg("arg0", JavaBeanSub.class)
        };
   
    Invoke invoke=new Invoke(null, new ObjectResolver(new SubGenericResolverImpl<JavaBean>()), "resolveBase", args, "result");
   
    Map<String, Object> src=new HashMap<String, Object>();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.