Package net.freedom.gj.beans.criteria

Examples of net.freedom.gj.beans.criteria.MapContext


    }
   
    @Test
    public void testFactoryUsingMapContext() throws Exception{
       
         MyService service = factory.getObject(new MapContext("payload","I am a string value") );
         assertEquals(MyServiceA.class, service.getClass());
         service.execute();
        
         service = factory.getObject(new MapContext("payload",new Integer(0),"switch","ON" ) );
         assertEquals(MyServiceB.class, service.getClass());
         service.execute();
        
         DataEntity pojo = new DataEntity("ABC","furniture");        
         service = factory.getObject(pojo);
View Full Code Here


   
    @Test
    public void testFactoryUsingMapContext() throws Exception{
       
         // Service A
         MyService service = factory.getObject(new MapContext("payload","I am a string value") );
         Assert.assertEquals(MyAnnotatedServiceA.class, service.getClass());
         service.execute();
        
         // Service A again due to OR annotation.
         service = factory.getObject(new MapContext("payload",new Date(),"other","extra") );
         Assert.assertEquals(MyAnnotatedServiceA.class, service.getClass());        
         service.execute();
        
         service = factory.getObject(new MapContext("payload",new Integer(0),"switch","ON" ) );
         Assert.assertEquals(MyAnnotatedServiceB.class, service.getClass());
         service.execute();
        
        
         DataEntity pojo = new DataEntity("ABC","furniture");        
View Full Code Here

TOP

Related Classes of net.freedom.gj.beans.criteria.MapContext

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.