Package test.org.magicbox.dbunit

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


    dbCentro = null;
  }
 
  public void testWrongTelefono() {
    DBCentro dbCentro = new DBCentro();
    dbCentro.preparaDb();

    // telefono non numerico e lunghezza insufficiente
    Indirizzo indirizzo = new IndirizzoImpl("09100","cagliari","CA","via casamia 1");
    //use impl only for test
    CentroLightImpl centroLight = new CentroLightImpl();
View Full Code Here


    dbCentro = null;
  }*/
 
  public void testWrongDescrizione() {
    DBCentro dbCentro = new DBCentro();
    dbCentro.preparaDb();

    // descrizione di lunghezza insufficiente
    Indirizzo indirizzo = new IndirizzoImpl("09100","cagliari","CA","via casamia 1");
    //use impl only for test
    CentroLightImpl centroLight = new CentroLightImpl();
View Full Code Here

  }
 
  public void testElenco() throws Exception {

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

    _reqMock = new MockHttpServletRequest("GET", "/donatori.page?action=elenco");
    _reqMock.addRole(Constant.ROLE_USER)
View Full Code Here

 
 
  public void testConferma() throws Exception {

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

    _reqMock = new MockHttpServletRequest("GET", "/donatori.page?action=conferma");
    _reqMock.getSession().setAttribute(Constant.ID_CENTRO_SESSIONE, new Long(46));
View Full Code Here

  }
 
  public void testElimina() throws Exception {

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

    _reqMock = new MockHttpServletRequest("GET", "/donatori.page?action=elimina");
    _reqMock.getSession().setAttribute(Constant.ID_CENTRO_SESSIONE, new Long(46));
View Full Code Here

  }
 
  public void testDettaglio() throws Exception {

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

    _reqMock = new MockHttpServletRequest("GET", "/donatori.page?action=dettaglio");
    _reqMock.getSession().setAttribute(Constant.ID_CENTRO_SESSIONE, new Long(46));
View Full Code Here

    assertTrue(_manager.getNumeroCentri() == 0);
  }

  public void testGetCentro() {
    DBCentro dbCentro = new DBCentro();
    dbCentro.preparaDb();

    Centro centro = _manager.getCentro(new Long(46));
    assertEquals(centro.getCap(), "09100");
    assertEquals(centro.getCitta(), "Cagliari");
    assertEquals(centro.getCreditoResiduoSms(), 200);
View Full Code Here

  }

  public void testGetInfoCentro() {

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

    CentroLight light = _manager.getInfoCentro(new Long(46));

    assertEquals(light.getCreditoResiduoSms(), 200);
    assertEquals(light.getNomeCentro(), "Cagliari Uno");
View Full Code Here

  }

  public void testDeleteCentro() {

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

    assertTrue(_manager.deleteCentro(new Long(46)));
    dbCentro = null;
  }
View Full Code Here

  }
 
  public void testSmsWizard() throws Exception {

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

    _reqMock = new MockHttpServletRequest("POST", "/sms.page");
    _reqMock.getSession().setAttribute(Constant.ID_CENTRO_SESSIONE, 46l);
    _reqMock.setParameter("_finish", "true");
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.