Examples of DBUtenti


Examples of test.org.magicbox.dbunit.DBUtenti

    dbCentro = null;
  }

  public void testUpdateCancellazioneGruppo() {
    DBCentro dbCentro = new DBCentro();
    DBUtenti db = new DBUtenti();
    dbCentro.preparaDb();
    db.preparaDb();

    assertEquals(_service.getUtentiGruppo(46, 3).size(), 6);
    assertEquals(_service.updateCancellazioneGruppo(3), true);
    assertEquals(_service.getUtentiCentroLiberi(46).size(), 6);

    db.pulisciDb();
    dbCentro.pulisciDb();
    db = null;
    dbCentro = null;
  }
View Full Code Here

Examples of test.org.magicbox.dbunit.DBUtenti

  }

  public void testGetMailgruppi() {
    DBCentri dbC = new DBCentri();
    dbC.preparaDb();
    DBUtenti db = new DBUtenti();
    db.preparaDb();
   
    assertEquals(_service.getMailgruppi("1").size(), 5);
    assertEquals(_service.getMailgruppi("1,2").size(), 8);
    assertEquals(_service.getMailgruppi("1,2,3").size(), 14);
    assertEquals(_service.getMailgruppi("1,2,3,4").size(), 15);
   
    db.pulisciDb();
    dbC.pulisciDb();
    db = null;
    dbC = null;
  }
View Full Code Here

Examples of test.org.magicbox.dbunit.DBUtenti

  }
 
  public void testGetMailGruppo() {
    DBCentri dbC = new DBCentri();
    dbC.preparaDb();
    DBUtenti db = new DBUtenti();
    db.preparaDb();
    assertEquals(_dao.getMailgruppi("1").size(), 5);
    assertEquals(_dao.getMailgruppi("1,2").size(), 8);
    assertEquals(_dao.getMailgruppi("1,2,3").size(), 14);
    assertEquals(_dao.getMailgruppi("1,2,3,4").size(), 15);
    db.pulisciDb();
    dbC.pulisciDb();
    db = null;
    dbC = null;
  }
View Full Code Here

Examples of test.org.magicbox.dbunit.DBUtenti

    _dao = (UtentiDao) _ctx.getBean("magicbox.utentiDao");
  }

  public void testGetUtentiCentro() {
    DBCentro dbCentro = new DBCentro();
    DBUtenti db = new DBUtenti();
    dbCentro.preparaDb();
    db.preparaDb();

    assertEquals(_dao.getUtentiCentro(46, 0).size(), 15);

    db.pulisciDb();
    dbCentro.pulisciDb();
    db = null;
    dbCentro = null;
   
  }
View Full Code Here

Examples of test.org.magicbox.dbunit.DBUtenti

   
  }

  public void testGetUtentiCentroReport() {
    DBCentro dbCentro = new DBCentro();
    DBUtenti db = new DBUtenti();
    dbCentro.preparaDb();
    db.preparaDb();

    assertEquals(_dao.getUtentiCentroReport(46).size(), 15);

    db.pulisciDb();
    dbCentro.pulisciDb();
    db = null;
    dbCentro = null;
  }
View Full Code Here

Examples of test.org.magicbox.dbunit.DBUtenti

    dbCentro = null;
  }

  public void testGetUtente() {
    DBCentro dbCentro = new DBCentro();
    DBUtenti db = new DBUtenti();
    dbCentro.preparaDb();
    db.preparaDb();

    List<UtenteLight> utenti = _dao.getUtentiByCap("46010", 46, 0);
    assertEquals(utenti.size(), 1);
    UtenteLight utente = utenti.get(0);
    Utente utenteRecuperato = _dao.getUtente(utente.getId(), 46);

    assertEquals(utente.getId(), utenteRecuperato.getId());
    assertEquals(utente.getNominativo(), utenteRecuperato.getNominativo());
    assertEquals(utente.getTessera(), utenteRecuperato.getTessera());

    db.pulisciDb();
    dbCentro.pulisciDb();
    db = null;
    dbCentro = null;
  }
View Full Code Here

Examples of test.org.magicbox.dbunit.DBUtenti

    dbCentro = null;
  }

  public void testInsertUtente() {
    DBCentro dbCentro = new DBCentro();
    DBUtenti dbUtenti = new DBUtenti();
    dbCentro.preparaDb();
    RecapitoTelefonico recapitoTel = new RecapitoTelefonicoImpl("3391234567", "070123457", "070123458",
        "070123456");
    Indirizzo indirizzo = new IndirizzoImpl("09129", "Cagliari", "CA",
        "Via Casamia 1");
    UtenteLight utenteLight = new UtenteLightImpl("101", "Baldussu Aldo",0, 2);

    Utente utente = new UtenteImpl(utenteLight,46,"desmax74@yahoo.it", true,indirizzo ,recapitoTel);
    Long id = _dao.insertUtente(utente);
    Utente utenteRecuperato = _dao.getUtente(id, 46);
    assertNotNull(utenteRecuperato);

    dbUtenti.pulisciDb();
    dbCentro.pulisciDb();
    dbUtenti = null;
    dbCentro = null;
  }
View Full Code Here

Examples of test.org.magicbox.dbunit.DBUtenti

    dbCentro = null;
  }

  public void testUpdateUtente() {
    DBCentro dbCentro = new DBCentro();
    DBUtenti dbUtenti = new DBUtenti();
    dbCentro.preparaDb();
    RecapitoTelefonico recapitoTel = new RecapitoTelefonicoImpl("3391234567", "070123457", "070123458",
        "070123456");
    Indirizzo indirizzo = new IndirizzoImpl("09129", "Cagliari", "CA",
        "Via Casamia 1");

    UtenteLight utenteLight = new UtenteLightImpl("101","Baldussu Aldo",0,2);
    Utente utente = new UtenteImpl(utenteLight,46, "desmax74@yahoo.it", true, indirizzo, recapitoTel);
   
    Long id = _dao.insertUtente(utente);
    Utente utenteRecuperato = _dao.getUtente(id, 46);
    assertNotNull(utenteRecuperato);

    Indirizzo indirizzoTwo = new IndirizzoImpl("09100", "Soleminis", "CA",
        "Via Casanostra 2");
    UtenteLight utenteLighttwo = new UtenteLightImpl("501","Aldo Baldussu",id,2);
    Utente utenteUpdate = new UtenteImpl(utenteLighttwo,46,"desmax74@yahoo.com", true,indirizzoTwo ,recapitoTel);

    assertTrue(_dao.updateUtente(utenteUpdate)==1);

    utente = _dao.getUtente(id, 46);
    assertEquals(utente.getCentro(), utenteUpdate.getCentro());
    assertEquals(utente.getId(), utenteUpdate.getId());
    assertEquals(utente.getIdGruppo(), utenteUpdate.getIdGruppo());
    assertEquals(utente.getCap(), utenteUpdate.getCap());
    assertEquals(utente.getCellulare(), utenteUpdate.getCellulare());
    assertEquals(utente.getCorris(), utenteUpdate.getCorris());
    assertEquals(utente.getEmail(), utenteUpdate.getEmail());
    assertEquals(utente.getIndirizzo(), utenteUpdate.getIndirizzo());
    assertEquals(utente.getNominativo(), utenteUpdate.getNominativo());
    assertEquals(utente.getProvincia(), utenteUpdate.getProvincia());
    assertEquals(utente.getTelefonoCasa(), utenteUpdate
        .getTelefonoCasa());
    assertEquals(utente.getTelefonoDomicilio(), utenteUpdate
        .getTelefonoDomicilio());
    assertEquals(utente.getTelefonoLavoro(), utenteUpdate
        .getTelefonoLavoro());
    assertEquals(utente.getTessera(), utenteUpdate.getTessera());

    dbUtenti.pulisciDb();
    dbCentro.pulisciDb();
  }
View Full Code Here

Examples of test.org.magicbox.dbunit.DBUtenti

    dbCentro.pulisciDb();
  }

  public void testDeleteAllUtenti() {
    DBCentro dbCentro = new DBCentro();
    DBUtenti dbUtenti = new DBUtenti();
    dbCentro.preparaDb();
    dbUtenti.preparaDb();

    assertEquals(_dao.getUtentiCentro(46, 0).size(), 15);
    assertEquals(_dao.deleteAllUtenti(46), 15);
    assertEquals(_dao.getUtentiCentro(46, 0).size(), 0);

    dbUtenti.pulisciDb();
    dbCentro.pulisciDb();
  }
View Full Code Here

Examples of test.org.magicbox.dbunit.DBUtenti

  }

  public void testInsertUtenti() {
    DBCentro dbCentro = new DBCentro();
    dbCentro.preparaDb();
    DBUtenti dbUtenti = new DBUtenti();
    List<Utente> utenti = new ArrayList<Utente>();
    for (int i = 0; i < 1000; i++) {
      RecapitoTelefonico recapitoTel = new RecapitoTelefonicoImpl( "3391234567", "070123457", "070123458",
          "070123456");
      Indirizzo indirizzo = new IndirizzoImpl("09129", "Cagliari", "CA",
          "Via Casamia 1");
      UtenteLight utenteLight = new UtenteLightImpl("101","Baldussu Aldo",0,2);
      Utente utente = new UtenteImpl(utenteLight,46, "desmax74@yahoo.it", true, indirizzo, recapitoTel);
      utenti.add(utente);
    }

    assertEquals(1000, _dao.insertUtenti(utenti, 46));

    dbUtenti.pulisciDb();
    dbCentro.pulisciDb();
    dbUtenti = null;
    dbCentro = null;
  }
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.