Examples of UtenteLight


Examples of org.magicbox.domain.UtenteLight

  public void testCostruttorePieno() {
   
    RecapitoTelefonico recapitoTel = new RecapitoTelefonicoImpl( "3391234567", "070123456", "", "");
    Indirizzo indirizzo = new IndirizzoImpl( "09100", "Cagliari", "CA",
        "Via casasua 1");
    UtenteLight utenteLight = new UtenteLightImpl("101","paolino paperino",0,2);
    Utente utente = new UtenteImpl(utenteLight,46, "pippo@yahoo.it", true, indirizzo, recapitoTel);   
    assertTrue(utente.getId()== 0);
    assertTrue(2 == utente.getIdGruppo());
    assertTrue(46 == utente.getCentro());
    assertEquals("paolino paperino",utente.getNominativo());
View Full Code Here

Examples of org.magicbox.domain.UtenteLight

  public void setUp() throws Exception {}
 
  public void tearDown() throws Exception {}
 
  public void testCostruttoreVuoto() {
    UtenteLight utente = new UtenteLightImpl();
    assertTrue(utente.getId() == -1);
    assertTrue(-1 == utente.getIdGruppo());
    assertNull(utente.getNominativo());
    assertNull(utente.getTessera());

  }
View Full Code Here

Examples of org.magicbox.domain.UtenteLight

    assertNull(utente.getTessera());

  }
 
  public void testCostruttorePieno() {
    UtenteLight utente = new UtenteLightImpl("x45tr","paolino paperino",1,2);
    assertEquals(1,utente.getId());
    assertEquals(2,utente.getIdGruppo());
    assertEquals("paolino paperino",utente.getNominativo());
    assertEquals("x45tr",utente.getTessera());
  }
View Full Code Here

Examples of org.magicbox.domain.UtenteLight

    _reqMock = new MockHttpServletRequest("GET", "/donatore.page");
    _reqMock.getSession().setAttribute(Constant.ID_CENTRO_SESSIONE, 46l);
    RecapitoTelefonico recapitoTel = new RecapitoTelefonicoImpl( "3391234567", "070123456", "", "");
    Indirizzo indirizzo = new IndirizzoImpl( "09100", "Cagliari", "CA",
        "Via casasua 1");
    UtenteLight utenteLight = new UtenteLightImpl("101","pippo",0,2);
    Utente utente = new UtenteImpl(utenteLight,46, "pippo@yahoo.it", true, indirizzo, recapitoTel);
    ModelAndView mav = _controller.onSubmit(_reqMock, _resMock, utente,
        new BindException(utente, Constant.DONOR));
    assertEquals(Constant.REDIRECT_ELENCO_DONORS, mav.getViewName());
View Full Code Here

Examples of org.magicbox.domain.UtenteLight

    _reqMock = new MockHttpServletRequest("GET", "/donatore.page");
    _reqMock.getSession().setAttribute(Constant.ID_CENTRO_SESSIONE, 46l);
    RecapitoTelefonico recapitoTel = new RecapitoTelefonicoImpl( "3391234567", "070123456", "", "");
    Indirizzo indirizzo = new IndirizzoImpl( "09100", "Cagliari", "CA",
        "Via casasua 1");
    UtenteLight utenteLight = new UtenteLightImpl("","pippo",0,6667);
    Utente utente = new UtenteImpl(utenteLight,46, "pippo@yahoo.it", true, indirizzo, recapitoTel);

    ModelAndView mav = _controller.onSubmit(_reqMock, _resMock, utente,
        new BindException(utente, Constant.DONOR));
    assertEquals(Constant.REDIRECT_ELENCO_DONORS, mav.getViewName());
View Full Code Here

Examples of org.magicbox.domain.UtenteLight

    dbCentro.preparaDb();
    db.preparaDb();

    List<UtenteLight> utenti = _service.getUtentiByCap("46010", 46, 0);
    assertEquals(utenti.size(), 1);
    UtenteLight utente = utenti.get(0);
    Utente utenteRecuperato = _service.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 org.magicbox.domain.UtenteLight

    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 = _service.saveUtente(utente);
    Utente utenteRecuperato = _service.getUtente(id, 46);
    assertNotNull(utenteRecuperato);
View Full Code Here

Examples of org.magicbox.domain.UtenteLight

    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 = _service.saveUtente(utente);
    Utente utenteRecuperato = _service.getUtente(id, 46);
    assertNotNull(utenteRecuperato);

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

    _service.saveUtente(utenteRecuperato);

    utente = _service.getUtente(id, 46);
View Full Code Here

Examples of org.magicbox.domain.UtenteLight

    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 = _service.saveUtente(utente);
    Utente utenteRecuperato = _service.getUtente(id, 46);
    assertNotNull(utenteRecuperato);
View Full Code Here

Examples of org.magicbox.domain.UtenteLight

    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, _service.insertUtenti(utenti, 46));
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.