Package org.magicbox.domain

Examples of org.magicbox.domain.PageLight


    assertEquals(0,page.getIdCentro());
    assertEquals(0,page.getOrdine());
  }
 
  public void testCostruttorePieno() {
    PageLight pageLight = new PageLightImpl(new Long(13),"titolo");
    Page page = new PageImpl("contenuto",false,2,46,pageLight);
    assertEquals("titolo",page.getTitolo());
    assertTrue(page.getId() == 13);
    assertEquals("contenuto",page.getContent());
    assertEquals(46,page.getIdCentro());
View Full Code Here


  public void setUp() throws Exception {}
 
  public void tearDown() throws Exception {}
 
  public void testCostruttoreVuoto() {
    PageLight page = new PageLightImpl();
    assertNull(page.getTitolo());
    assertTrue(page.getId() == -1);
  }
View Full Code Here

    assertNull(page.getTitolo());
    assertTrue(page.getId() == -1);
  }
 
  public void testCostruttorePieno() {
    PageLight page = new PageLightImpl(new Long(13),"titolo");
    assertEquals("titolo",page.getTitolo());
    assertTrue(page.getId() == 13);
  }
View Full Code Here

  public void testGetPage() {
    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);
      assertNotNull(_service.getPage(id));
View Full Code Here

  public void testInserisciPage() {
    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);
      _service.savePage(pagina);
      assertTrue(_service.getPages().size() == 1);
View Full Code Here

  public void testCancellaPage() {
    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);
View Full Code Here

  public void testAggiornaPage() {
    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);
View Full Code Here

  public void testInserisciPage() {
    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

  public void testGetPage() {
    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);
View Full Code Here

TOP

Related Classes of org.magicbox.domain.PageLight

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.