Package org.magicbox.domain

Examples of org.magicbox.domain.Page


    DBCentro dbCentro = new DBCentro();
    dbCentro.preparaDb();
    DBPages db = new DBPages();
   
    PageLight pageLight = new PageLightImpl(0,"prova");
    Page pagina = new PageImpl("blah blah",false,1,46,pageLight);
   
    assertTrue(_service.getPages().size() == 0);
      Long id = _service.savePage(pagina);
      assertTrue(_service.getPages().size() == 1);
    assertEquals(_service.cancellaPage(id),true);
View Full Code Here


    DBCentro dbCentro = new DBCentro();
    dbCentro.preparaDb();
    DBPages db = new DBPages();
   
    PageLight pageLight = new PageLightImpl(0,"prova");
    Page pagina = new PageImpl("blah blah",false,1,46,pageLight);
   
    assertTrue(_service.getPages().size() == 0);
      Long id = _service.savePage(pagina);
      assertTrue(_service.getPages().size() == 1);
   
      PageLight pageLightUpdate = new PageLightImpl(id,"test");
    Page paginaUpdate = new PageImpl("mumble mumble",false,2,46,pageLightUpdate);
   
    assertTrue(_service.savePage(paginaUpdate)== 1);
   
    Page recuperata = _service.getPage(id);
   
    assertEquals(recuperata.getId(), paginaUpdate.getId());
    assertEquals(recuperata.getContent(), paginaUpdate.getContent());
    assertEquals(recuperata.getIdCentro(), paginaUpdate.getIdCentro());
    assertEquals(recuperata.isAdmin(), paginaUpdate.isAdmin());
    assertEquals(recuperata.getTitolo(), paginaUpdate.getTitolo());
    assertEquals(recuperata.getOrdine(), paginaUpdate.getOrdine());
   
    db.pulisciDb();
    dbCentro.preparaDb();
    db = null;
    dbCentro = null;
View Full Code Here

    DBCentro dbCentro = new DBCentro();
    dbCentro.preparaDb();
    DBPages db = new DBPages();
   
    PageLight pageLight = new PageLightImpl(0,"prova");
    Page pagina = new PageImpl("blah blah",false,1,46,pageLight);
   
    assertTrue(_dao.getPages().size() == 0);
      _dao.inserisciPage(pagina);
      assertTrue(_dao.getPages().size() == 1);
   
View Full Code Here

    DBCentro dbCentro = new DBCentro();
    dbCentro.preparaDb();
    DBPages db = new DBPages();
   
    PageLight pageLight = new PageLightImpl(0,"prova");
    Page pagina = new PageImpl("blah blah",false,1,46,pageLight);
    assertTrue(_dao.getPages().size() == 0);
   
      Long id =_dao.inserisciPage(pagina);
      assertNotNull(_dao.getPage(id));
   
View Full Code Here

    DBCentro dbCentro = new DBCentro();
    dbCentro.preparaDb();
    DBPages db = new DBPages();
   
    PageLight pageLight = new PageLightImpl(0,"prova");
    Page pagina = new PageImpl("blah blah",false,1,46,pageLight);
   
    assertTrue(_dao.getPages().size() == 0);
      Long id = _dao.inserisciPage(pagina);
      assertTrue(_dao.getPages().size() == 1);
   
      PageLight pageLightUpdate = new PageLightImpl(id,"test");
    Page paginaUpdate = new PageImpl("mumble mumble",false,2,46,pageLightUpdate);
   
    assertTrue(_dao.aggiornaPage(paginaUpdate) == 1);
   
    Page recuperata = _dao.getPage(id);
   
    assertEquals(recuperata.getId(), paginaUpdate.getId());
    assertEquals(recuperata.getContent(), paginaUpdate.getContent());
    assertEquals(recuperata.getIdCentro(), paginaUpdate.getIdCentro());
    assertEquals(recuperata.isAdmin(), paginaUpdate.isAdmin());
    assertEquals(recuperata.getTitolo(), paginaUpdate.getTitolo());
    assertEquals(recuperata.getOrdine(), paginaUpdate.getOrdine());
   
    db.pulisciDb();
    dbCentro.preparaDb();
    db = null;
    dbCentro = null;
View Full Code Here

    DBCentro dbCentro = new DBCentro();
    dbCentro.preparaDb();
    DBPages db = new DBPages();
   
    PageLight pageLight = new PageLightImpl(0,"prova");
    Page pagina = new PageImpl("blah blah",false,1,46,pageLight);
   
    assertTrue(_dao.getPages().size() == 0);
      Long id = _dao.inserisciPage(pagina);
      assertTrue(_dao.getPages().size() == 1);
    assertEquals(_dao.cancellaPage(id),true);
View Full Code Here

TOP

Related Classes of org.magicbox.domain.Page

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.