Package test.reverspring.beans

Examples of test.reverspring.beans.Persona


import test.reverspring.beans.ListaDiPersone;
import test.reverspring.beans.Persona;

public class TestBeanSet extends TestCase {
  public void testAddBeanDescriptor() {
    Persona persona = new Persona();
    persona.nome = "luigi";
    persona.setCongnome("Dell'Aquila");
    persona.setIndirizzo(new Indirizzo());
    persona.getIndirizzo().setVia("via di casa mia");
    persona.getIndirizzo().setCivico(1);
    persona.getIndirizzo().setProprietario(persona);

    BeanSet set = new BeanSet();
    set.addBeanDescriptor(persona, "personaId");

    List<BeanDescriptor> beans = set.getBeans();
View Full Code Here


    lista.mappaStringhe = new HashMap<String, String>();
    lista.mappaPersone = new HashMap<Persona, Persona>();
    lista.mappaStringhe.put("ciao", "pippo");

    Persona chiave = new Persona();
    chiave.nome = "chiave";
    chiave.setCongnome("cognomeChiave");

    Persona valore = new Persona();
    valore.nome = "valore";
    valore.setCongnome("cognomeValore");

    lista.mappaPersone.put(chiave, valore);

    set.addBeanDescriptor(lista, "persone");
View Full Code Here

import test.reverspring.beans.Persona;
import junit.framework.TestCase;

public class TestDescriptorGenerator extends TestCase {
  public void testGenerateDescriptor() {
    Persona persona = new Persona();
    persona.nome = "luigi";
    persona.setCongnome("Dell'Aquila");
    persona.setIndirizzo(new Indirizzo());
    persona.getIndirizzo().setVia("via di casa mia");
    persona.getIndirizzo().setCivico(1);
    persona.getIndirizzo().setProprietario(persona);
    System.out.println();
    System.out.println(DescriptorGenerator.generateDescriptor(persona, "personaId"));
    System.out.println();
  }
View Full Code Here

    classes.add(personaConfig);
    strategy.setClasses(classes);
   
    BeanSet set=new BeanSet(strategy);
   
    Persona pippo=new Persona();
    pippo.setCongnome("baudo");
    pippo.setNome("pippo");
   
    set.addBeanDescriptor(pippo, "pippo");
   
    System.out.println(XmlGenerator.getXml(set));
  }
View Full Code Here

TOP

Related Classes of test.reverspring.beans.Persona

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.