Examples of UtenteImpl


Examples of org.magicbox.domain.UtenteImpl

    assertTrue(errors.getErrorCount() == 2);
  }

  public void testCittaWrong() {

    UtenteImpl  utente = new UtenteImpl();
    utente.setNominativo("Pippo");
    utente.setCap("09100");
    utente.setCellulare("3391234567");
    // minore della lunghezza minima
    utente.setCitta("ca");
   
    Errors errors = new BindException(utente, "command");

    _validator.validate(utente, errors);
    assertTrue(errors.hasErrors());
View Full Code Here

Examples of org.magicbox.domain.UtenteImpl

    assertTrue(errors.getErrorCount() == 1);
  }

  public void testEmailWrong() {

    UtenteImpl  utente = new UtenteImpl();
    utente.setNominativo("Pippo");
    utente.setCap("09100");
    utente.setCellulare("3391234567");
    utente.setCitta("Cagliari");
    // indirizzo non valido formalmente
    utente.setEmail("ciccio.it");
   
    Errors errors = new BindException(utente, "command");

    _validator.validate(utente, errors);
    assertTrue(errors.hasErrors());
View Full Code Here

Examples of org.magicbox.domain.UtenteImpl

    assertTrue(errors.getErrorCount() == 1);
  }

  public void testIndirizzoWrong() {

    UtenteImpl  utente = new UtenteImpl();
    utente.setNominativo("Pippo");
    utente.setCap("09100");
    utente.setCellulare("3391234567");
    utente.setCitta("Cagliari");
    utente.setEmail("paperino@ciccio.it");
    // indirizzo minore della lunghezza minima
    utente.setIndirizzo("via");
   
    Errors errors = new BindException(utente, "command");

    _validator.validate(utente, errors);
    assertTrue(errors.hasErrors());
View Full Code Here

Examples of org.magicbox.domain.UtenteImpl

    assertTrue(errors.getErrorCount() == 1);
  }

  public void testprovinciaWrong() {

    UtenteImpl  utente = new UtenteImpl();
    utente.setNominativo("Pippo");
    utente.setCap("09100");
    utente.setCellulare("3391234567");
    utente.setCitta("Cagliari");
    utente.setEmail("paperino@ciccio.it");
    utente.setIndirizzo("Via casamia 1");
    // non alfabetico e minore della lunghezza corretta
    utente.setProvincia("1");
   
    Errors errors = new BindException(utente, "command");

    _validator.validate(utente, errors);
    assertTrue(errors.hasErrors());
View Full Code Here

Examples of org.magicbox.domain.UtenteImpl

    assertTrue(errors.getErrorCount() == 2);
  }

  public void testTelefonoCasaWrong() {

    UtenteImpl  utente = new UtenteImpl();
    utente.setNominativo("Pippo");
    utente.setCap("09100");
    utente.setCellulare("3391234567");
    utente.setCitta("Cagliari");
    utente.setEmail("paperino@ciccio.it");
    utente.setIndirizzo("Via casamia 1");
    utente.setProvincia("CA");
    // non numerico e minore della lunghezza corretta
    utente.setTelefonoCasa("adb");
   
    Errors errors = new BindException(utente, "command");

    _validator.validate(utente, errors);
    assertTrue(errors.hasErrors());
View Full Code Here

Examples of org.magicbox.domain.UtenteImpl

    assertTrue(errors.getErrorCount() == 2);
  }

  public void testTelefonoDomicilioWrong() {

    UtenteImpl  utente = new UtenteImpl();
    utente.setNominativo("Pippo");
    utente.setCap("09100");
    utente.setCellulare("3391234567");
    utente.setCitta("Cagliari");
    utente.setEmail("paperino@ciccio.it");
    utente.setIndirizzo("Via casamia 1");
    utente.setProvincia("CA");
    utente.setTelefonoCasa("070123456");
    // non numerico e minore della lunghezza corretta
    utente.setTelefonoDomicilio("ae");
   
    Errors errors = new BindException(utente, "command");

    _validator.validate(utente, errors);
    assertTrue(errors.hasErrors());
View Full Code Here

Examples of org.magicbox.domain.UtenteImpl

    assertTrue(errors.getErrorCount() == 2);
  }

  public void testTelefonoLavoroWrong() {

    UtenteImpl  utente = new UtenteImpl();
    utente.setNominativo("Pippo");
    utente.setCap("09100");
    utente.setCellulare("3391234567");
    utente.setCitta("Cagliari");
    utente.setEmail("paperino@ciccio.it");
    utente.setIndirizzo("Via casamia 1");
    utente.setProvincia("CA");
    utente.setTelefonoCasa("070123456");
    utente.setTelefonoDomicilio("070234567");
    // non numerico e minore della lunghezza corretta
    utente.setTelefonoLavoro("ae");
   
    Errors errors = new BindException(utente, "command");

    _validator.validate(utente, errors);
    assertTrue(errors.hasErrors());
View Full Code Here

Examples of org.magicbox.domain.UtenteImpl

        long id = ServletRequestUtils.getLongParameter(req, Constant.ID, 0);

        if (id != 0) {
            return utentiManager.getUtente(id, WebUtils.getIdCentro(req));
        } else {
            return new UtenteImpl();
        }
    }
View Full Code Here

Examples of org.magicbox.domain.UtenteImpl

        }
    }

    public ModelAndView onSubmit(HttpServletRequest req, HttpServletResponse res, Object command, BindException errors) throws Exception {

        utentiManager.saveUtente(new UtenteImpl((Utente) command, WebUtils.getIdCentro(req)));
        return new ModelAndView(getSuccessView());
    }
View Full Code Here

Examples of org.magicbox.domain.UtenteImpl

    /*
     * TESSERA;COGNOME e NOME;CAP;CITTA;PROV;INDIRIZZO;TEL_CASA;TEL_LAVORO;CELLULARE;E-MAIL;TEL_DOMIC;CORRIS. 4916;dessi massimiliano;09129;Cagliari;CA;V. casamia 13;070/123456;;;;;S
     */
    private Utente valorizzaObject(String[] campi, long idCentro) {
        return new UtenteImpl(valorizzaUtenteLight(campi), idCentro, campi[9], new Boolean(campi[11]), valorizzaIndirizzo(campi), valorizzaRecapiti(campi));
    }
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.