Examples of preparaDb()


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

  }
 
 
  public void testCorrectPassword() {
    DBCredentials dbCredentials = new DBCredentials();
    dbCredentials.preparaDb();
    Credenziali creds = new Credenziali();
    creds.setUsername("pippo");
    creds.setOldPassword("pippo");
    creds.setPassword("");
    creds.setConfermaPassword("");
View Full Code Here

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

  public void testElenco() throws Exception {

    DBCentro dbCentro = new DBCentro();
    dbCentro.preparaDb();
    DBCredentials dbCredentials = new DBCredentials();
    dbCredentials.preparaDb();
    DBAdmin dbAdmin = new DBAdmin();
    dbAdmin.preparaDb();

    _reqMock = new MockHttpServletRequest("GET", "/amministratori.admin?action=elenco");
View Full Code Here

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

  public void testDettaglio() throws Exception {

    DBCentro dbCentro = new DBCentro();
    dbCentro.preparaDb();
    DBCredentials dbCredentials = new DBCredentials();
    dbCredentials.preparaDb();
    DBAdmin dbAdmin = new DBAdmin();
    dbAdmin.preparaDb();

    _reqMock = new MockHttpServletRequest("GET", "/amministratori.admin?action=dettaglio");
    _reqMock.setParameter(Constant.ID, "1");
View Full Code Here

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

  }

  public void testUpdateCredentials(){
    // inserisco max e pippo sul db
    DBCredentials dbCredentials = new DBCredentials();
    dbCredentials.preparaDb();
   
    Credenziali credenziali = _service.getUser("pippo", Cripto.stringToSHA("pippo"));

    assertEquals(credenziali.getUsername(),"pippo");
    assertNull(credenziali.getPassword());
View Full Code Here

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

   

  public void testGetAdminByUsername(){
    // inserisco max e pippo sul db
    DBCredentials dbCredentials = new DBCredentials();
    dbCredentials.preparaDb();
   
    Credenziali credenziali = _service.getAdminByUsername("pippo");

    assertEquals(credenziali.getUsername(),"pippo");
    assertNull(credenziali.getPassword());
View Full Code Here

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

  public void testUpdateGruppo() throws Exception {

    DBCentro dbCentro = new DBCentro();
    dbCentro.preparaDb();
    DBGruppi dbGruppi = new DBGruppi();
    dbGruppi.preparaDb();
   
    _reqMock = new MockHttpServletRequest("GET", "/gruppo.page");
    _reqMock.getSession().setAttribute(Constant.ID_CENTRO_SESSIONE, 46l);
    GruppoImpl gruppo = new GruppoImpl();
    gruppo.setId(1);
View Full Code Here

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

  public void testGruppo() throws Exception {

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

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

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

  public void testDettaglio() throws Exception {

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

    _reqMock = new MockHttpServletRequest("GET",
        "/pages.admin?action=dettaglio");
    _reqMock.setParameter(Constant.ID, "1");
    ModelAndView mav = _controller.dettaglio(_reqMock, _resMock);
View Full Code Here

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

    dbRoles.pulisciDb();
  }
 
  public void testDeleteFromRoles() {
    DBRoles dbRoles = new DBRoles();
    dbRoles.preparaDb();
    assertTrue(_service.deleteFromRoles("anon"));
    assertTrue(_service.deleteFromRoles("max"));
    assertTrue(_service.deleteFromRoles("pippo"));

    dbRoles.pulisciDb();
View Full Code Here

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

 
  public void testInsertStorico() {
    DBCentro dbCentro = new DBCentro();
    dbCentro.preparaDb();
    DBStorico dbStorico = new DBStorico();
    dbStorico.preparaDb();
    Spedizione spedizioneDTO = new Spedizione();
    spedizioneDTO.setData(new Date());
    spedizioneDTO.setInvii(3000);
    spedizioneDTO.setTipo(Constant.TYPE_MAIL);
    // use impl only for test
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.