Package org.reverspring.strategy.beanconfig

Examples of org.reverspring.strategy.beanconfig.BeanConfigurationStrategy


import junit.framework.TestCase;

public class ConfigStrategyTest extends TestCase{
 
  public void test1() throws Exception{
    BeanConfigurationStrategy strategy=new BeanConfigurationStrategy();
   
    ClassConfiguration personaConfig=new ClassConfiguration();
    personaConfig.setClassName(Persona.class.getName());
    FieldConfiguration nomePersonaConfig=new FieldConfiguration();
    nomePersonaConfig.setFieldName("nome");
    nomePersonaConfig.setNested(true);
    List<FieldConfiguration> fields=new ArrayList<FieldConfiguration>();
    fields.add(nomePersonaConfig);
    personaConfig.setFields(fields);
   
    List<ClassConfiguration> classes=new ArrayList<ClassConfiguration>();
    classes.add(personaConfig);
    strategy.setClasses(classes);
   
    BeanSet set=new BeanSet(strategy);
   
    Persona pippo=new Persona();
    pippo.setCongnome("baudo");
View Full Code Here

TOP

Related Classes of org.reverspring.strategy.beanconfig.BeanConfigurationStrategy

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.