Package org.magicbox.domain

Examples of org.magicbox.domain.CentroLight


  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");
    assertEquals(light.getNumeroDonatori(), 15);

    dbCentro.pulisciDb();
    dbCentro = null;
  }
View Full Code Here


  public void setUp() throws Exception {}
 
  public void tearDown() throws Exception {}
 
  public void testCostruttoreVuoto() {
    CentroLight centro = new CentroLightImpl();
    assertNull(centro.getNomeCentro());
    assertEquals(0,centro.getCreditoResiduoSms());
    assertTrue(centro.getId() == 0);
    assertEquals(0,centro.getNumeroDonatori());
  }
View Full Code Here

*/
public class UtentiController extends MultiActionController {

    public ModelAndView elenco(HttpServletRequest req, HttpServletResponse res) throws Exception {

        CentroLight centro = centriManager.getInfoCentro(WebUtils.getIdCentro(req));
        Page page = WebUtils.getPagina(req, centro.getNumeroDonatori(), utentiManager.getNumeroUtentiPerPagina());

        ModelAndView mav = new ModelAndView("donors/elencoDonatori");
        mav.addObject(Constant.ELENCO_DONATORI, utentiManager.getUtentiCentro(centro.getId(), page.getPagina()));
        mav.addObject(Constant.PAGE_VO, page);
        mav.addObject(Constant.CENTRO_DONAZIONE, centro);
        return mav;
    }
View Full Code Here

    centroLight.setNomeCentro("Casa mia");
    centroLight.setNumeroDonatori(144);
    Centro centro = new CentroImpl("http://www.magicbox.org","070123456","0701234567","desmatik@yahoo.it","Centro San Benedetto",indirizzo,centroLight);
    Long id =_dao.insertCentro(centro);
   
        CentroLight light = _dao.getInfoCentro(id);
   
        assertEquals(light.getCreditoResiduoSms(), centro.getCreditoResiduoSms());
        assertEquals(light.getNomeCentro(), centro.getNomeCentro());
        assertEquals(light.getNumeroDonatori(), centro.getNumeroDonatori());
       
    _dao.deleteCentro(id);

    assertTrue(_dao.getNumeroCentri() == 0);
  }
View Full Code Here

TOP

Related Classes of org.magicbox.domain.CentroLight

Copyright © 2018 www.massapicom. 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.