Package test.org.magicbox.dbunit

Examples of test.org.magicbox.dbunit.DBUtenti.preparaDb()


  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);
View Full Code Here


  public void testGetUtentiByNominativo() {

    DBCentro dbCentro = new DBCentro();
    DBUtenti db = new DBUtenti();
    dbCentro.preparaDb();
    db.preparaDb();

    assertEquals(_dao.getUtentiByNominativo("b", 46, 0).size(), 15);
    assertEquals(_dao.getUtentiByNominativo("ba", 46, 0).size(), 15);
    assertEquals(_dao.getUtentiByNominativo("bal", 46, 0).size(), 15);
    assertEquals(_dao.getUtentiByNominativo("bald", 46, 0).size(), 15);
View Full Code Here

  public void testGetUtentiByAlfabetico() {

    DBCentro dbCentro = new DBCentro();
    DBUtenti db = new DBUtenti();
    dbCentro.preparaDb();
    db.preparaDb();

    assertEquals(_dao.getUtentiByAlfabetico("a", 46, 0).size(), 0);
    assertEquals(_dao.getUtentiByAlfabetico("b", 46, 0).size(), 15);
    assertEquals(_dao.getUtentiByAlfabetico("c", 46, 0).size(), 0);
View Full Code Here

  public void testGetUtentiByCitta() {

    DBCentro dbCentro = new DBCentro();
    DBUtenti db = new DBUtenti();
    dbCentro.preparaDb();
    db.preparaDb();

    assertEquals(_dao.getUtentiByCitta("cagliari", 46, 0).size(), 10);
    assertEquals(_dao.getUtentiByCitta("milano", 46, 0).size(), 4);
    assertEquals(_dao.getUtentiByCitta("goito", 46, 0).size(), 1);
View Full Code Here

  public void testGetUtentiByProvincia() {

    DBCentro dbCentro = new DBCentro();
    DBUtenti db = new DBUtenti();
    dbCentro.preparaDb();
    db.preparaDb();

    assertEquals(_dao.getUtentiByProvincia("CA", 46, 0).size(), 11);
    assertEquals(_dao.getUtentiByProvincia("MI", 46, 0).size(), 3);
    assertEquals(_dao.getUtentiByProvincia("MN", 46, 0).size(), 1);
View Full Code Here

  public void testGetUtentiByCap() {

    DBCentro dbCentro = new DBCentro();
    DBUtenti db = new DBUtenti();
    dbCentro.preparaDb();
    db.preparaDb();

    assertEquals(_dao.getUtentiByCap("09100", 46, 0).size(), 11);
    assertEquals(_dao.getUtentiByCap("09129", 46, 0).size(), 2);
    assertEquals(_dao.getUtentiByCap("09128", 46, 0).size(), 1);
    assertEquals(_dao.getUtentiByCap("46010", 46, 0).size(), 1);
View Full Code Here

  public void testGetNumeroUtenti() {

    DBCentro dbCentro = new DBCentro();
    DBUtenti db = new DBUtenti();
    dbCentro.preparaDb();
    db.preparaDb();

    assertEquals(_dao.getNumeroUtentiCentro(46), 15);

    db.pulisciDb();
    dbCentro.pulisciDb();
View Full Code Here

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

    assertEquals(_dao.getUtentiGruppo(46, 1).size(), 5);
    assertEquals(_dao.getUtentiGruppo(46, 2).size(), 3);
    assertEquals(_dao.getUtentiGruppo(46, 3).size(), 6);
    assertEquals(_dao.getUtentiGruppo(46, 4).size(), 1);
View Full Code Here

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

    assertEquals(_dao.getUtentiCentroLiberi(46).size(), 0);

    db.pulisciDb();
    dbCentro.pulisciDb();
View Full Code Here

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

    List<UtenteLight> utenti = _dao.getUtentiCentro(46, 0);
    List<String> ids = new ArrayList<String>();
    for (int i = 0; i < 15; i++) {
      UtenteLight utente = utenti.get(i);
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.