Package org.soybeanMilk.core.exe

Examples of org.soybeanMilk.core.exe.Invoke


        new ValueArg("aaa"),
        new ValueArg("bbb"),
    };
    Resolver rp=new ObjectResolver(new TestResolver());
   
    Invoke re=new Invoke("test", rp,  "test1", args, RESULT_KEY);
   
    Assert.assertEquals(re.getName(), "test");
    Assert.assertEquals(re.getResultKey(), RESULT_KEY);
    Assert.assertEquals(re.getResolver(), rp);
    Assert.assertTrue( (re.getArgs()[0]==args[0]) );
    Assert.assertTrue( (re.getArgs()[1]==args[1]) );
  }
View Full Code Here


        new ValueArg("bbb"),
    };
   
    Resolver rp=new ObjectResolver(TestResolver.class);
   
    Invoke re=new Invoke("test", rp, "test1", args, RESULT_KEY);
   
    Assert.assertEquals(re.getName(), "test");
    Assert.assertEquals(re.getResultKey(), RESULT_KEY);
    Assert.assertEquals(re.getResolver(), rp);
    Assert.assertTrue( (re.getArgs()[0]==args[0]) );
    Assert.assertTrue( (re.getArgs()[1]==args[1]) );
  }
View Full Code Here

        new KeyArg("arg0"),
        new KeyArg("arg1"),
    };
    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", "1111");
   
    invoke.execute(os);
   
    Assert.assertEquals(TestResolver.RESULT, os.get(RESULT_KEY));
  }
View Full Code Here

        new KeyArg("arg1"),
    };
   
    Resolver rp=new ObjectSourceResolver("objectSourceResolver");
   
    Invoke invoke=new Invoke("test", rp, "test1", args, RESULT_KEY);
   
    ObjectSource os=new HashMapObjectSource(new DefaultGenericConverter());
    os.set("objectSourceResolver", new TestResolver());
    os.set("arg0", "arg0");
    os.set("arg1", "1111");
   
    invoke.execute(os);
   
    Assert.assertEquals(TestResolver.RESULT, os.get(RESULT_KEY));
  }
View Full Code Here

    ResolverObjectFactory rof=new DefaultResolverObjectFactory();
    rof.addResolverObject("factoryResolver", new TestResolver());
   
    Resolver rp=new FactoryResolver(rof, "factoryResolver");
   
    Invoke invoke=new Invoke("test", rp, "test1", args, RESULT_KEY);
   
    ObjectSource os=new HashMapObjectSource(new DefaultGenericConverter());
    os.set("arg0", "arg0");
    os.set("arg1", "1111");
   
    invoke.execute(os);
   
    Assert.assertEquals(TestResolver.RESULT, os.get(RESULT_KEY));
  }
View Full Code Here

    ResolverObjectFactory rof=new DefaultResolverObjectFactory();
    rof.addResolverObject("dynamicResolver", new TestResolver());
   
    Resolver rp=new DynamicResolver(null, new ObjectSourceResolver("dynamicResolver"));
   
    Invoke invoke=new Invoke("test", rp, "test1", args, RESULT_KEY);
   
    ObjectSource os=new HashMapObjectSource(new DefaultGenericConverter());
    os.set("dynamicResolver", new TestResolver());
    os.set("arg0", "arg0");
    os.set("arg1", "1111");
   
    invoke.execute(os);
   
    Assert.assertEquals(TestResolver.RESULT, os.get(RESULT_KEY));
  }
View Full Code Here

    ResolverObjectFactory rof=new DefaultResolverObjectFactory();
    rof.addResolverObject("dynamicResolver", new TestResolver());
   
    Resolver rp=new DynamicResolver(new FactoryResolver(rof, "dynamicResolver"), null);
   
    Invoke invoke=new Invoke("test", rp, "test1", args, RESULT_KEY);
   
    ObjectSource os=new HashMapObjectSource(new DefaultGenericConverter());
    os.set("arg0", "arg0");
    os.set("arg1", "1111");
   
    invoke.execute(os);
   
    Assert.assertEquals(TestResolver.RESULT, os.get(RESULT_KEY));
  }
View Full Code Here

   
    ResolverObjectFactory rof=new DefaultResolverObjectFactory();
   
    Resolver rp=new DynamicResolver(new FactoryResolver(rof, "dynamicResolver"), new ObjectSourceResolver("dynamicResolver"));
   
    Invoke invoke=new Invoke("test", rp, "test1", args, RESULT_KEY);
   
    ObjectSource os=new HashMapObjectSource(new DefaultGenericConverter());
    os.set("arg0", "arg0");
    os.set("arg1", "1111");
   
    ExecuteException re=null;
   
    try
    {
      invoke.execute(os);
    }
    catch(ExecuteException e)
    {
      re=e;
    }
View Full Code Here

          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);
     
      ObjectSource os=new HashMapObjectSource(new DefaultGenericConverter());
      os.set("arg", "33");
     
      invoke.execute(os);
     
      Assert.assertEquals("Integer", os.get(RESULT_KEY));
    }
  }
View Full Code Here

        new KeyArg("arg"),
      };
   
    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.assertNotNull(os.get(RESULT_KEY));
  }
View Full Code Here

TOP

Related Classes of org.soybeanMilk.core.exe.Invoke

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.