Package test.org.magicbox.dbunit

Examples of test.org.magicbox.dbunit.DBPages.preparaDb()


  public void testDettaglio() throws Exception {

    DBCentro dbCentro = new DBCentro();
    dbCentro.preparaDb();
    DBPages dbPages = new DBPages();
    dbPages.preparaDb();

    _reqMock = new MockHttpServletRequest("GET",
        "/pages.admin?action=dettaglio");
    _reqMock.setParameter(Constant.ID, "1");
    ModelAndView mav = _controller.dettaglio(_reqMock, _resMock);
View Full Code Here


  public void testElenco() throws Exception {

    DBCentri dbCentri = new DBCentri();
    dbCentri.preparaDb();
    DBPages dBPages = new DBPages();
    dBPages.preparaDb();

    _reqMock = new MockHttpServletRequest("GET",
        "/pages.admin?action=elenco");

    ModelAndView mav = _controller.elenco(_reqMock, _resMock);
View Full Code Here

  public void testCentro() throws Exception {

    DBCentri dbCentri = new DBCentri();
    dbCentri.preparaDb();
    DBPages dBPages = new DBPages();
    dBPages.preparaDb();

    _reqMock = new MockHttpServletRequest("GET",
        "/pages.admin?action=centro");
    _reqMock.getSession().setAttribute(Constant.ID_CENTRO_SESSIONE, 46l);
View Full Code Here

  public void testAdmin() throws Exception {

    DBCentri dbCentri = new DBCentri();
    dbCentri.preparaDb();
    DBPages dbPages = new DBPages();
    dbPages.preparaDb();

    _reqMock = new MockHttpServletRequest("GET",
        "/pages.admin?action=admin");

    ModelAndView mav = _controller.admin(_reqMock, _resMock);
View Full Code Here

  public void testUpdate() throws Exception {

    DBCentro dbCentro = new DBCentro();
    dbCentro.preparaDb();
    DBPages dbPages = new DBPages();
    dbPages.preparaDb();

    _reqMock = new MockHttpServletRequest("GET", "/page.admin");
    _reqMock.addParameter(Constant.ID, "46");
    Page pagina = new PageImpl(1,"titolone","bla bla",true,0,46);
View Full Code Here

  public void testInsert() throws Exception {

    DBCentro dbCentro = new DBCentro();
    dbCentro.preparaDb();
    DBPages dbPages = new DBPages();
    dbPages.preparaDb();

    _reqMock = new MockHttpServletRequest("GET", "/page.admin");
    _reqMock.addParameter(Constant.ID, "46");
    Page pagina = new PageImpl(0,"titolone","bla bla",true,0,46);
View Full Code Here

  public void testGetPages() {
    DBCentro dbCentro = new DBCentro();
    dbCentro.preparaDb();
    DBPages db = new DBPages();
    db.preparaDb();
   
    assertTrue(_service.getPages().size() == 10);
   
    db.pulisciDb();
    dbCentro.pulisciDb();
View Full Code Here

  public void testGetPagesAdmin() {
    DBCentro dbCentro = new DBCentro();
    dbCentro.preparaDb();
    DBPages db = new DBPages();
    db.preparaDb();
   
    assertTrue(_service.getPages().size() == 10);
    assertEquals(_service.getPagesAdmin().size(),3);
   
    db.pulisciDb();
View Full Code Here

  public void testGetPagesCentro() {
    DBCentro dbCentro = new DBCentro();
    dbCentro.preparaDb();
    DBPages db = new DBPages();
    db.preparaDb();
   
    assertTrue(_service.getPagesCentro(46).size() == 7);
   
    db.pulisciDb();
    dbCentro.pulisciDb();
View Full Code Here

  public void testGetPagesAdmin() {
   
    DBCentro dbCentro = new DBCentro();
    dbCentro.preparaDb();
    DBPages db = new DBPages();
    db.preparaDb();
   
    assertTrue(_dao.getPages().size() == 10);
    assertEquals(_dao.getPagesAdmin().size(),3);
   
    db.pulisciDb();
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.