Package org.tennisclub.manager.model

Examples of org.tennisclub.manager.model.Contacto


   */
  private static final long serialVersionUID = 4418128271569809260L;

  @Override
  protected Contacto createEmptyEntity() {
    return new Contacto();
  }
View Full Code Here


        this.dao = dao;
    }

    @Test
    public void testAddAndRemoveContacto() throws Exception {
        Contacto contacto = new Contacto();

        // enter all required fields

        log.debug("adding contacto...");
        contacto = dao.save(contacto);
//
        contacto = dao.get(contacto.getId());

        assertNotNull(contacto.getId());

        log.debug("removing contacto...");

        dao.remove(contacto.getId());
//
        try {
            dao.get(contacto.getId());
            fail("Contacto found in database");
        } catch (CrudException dae) {
            log.debug("Expected exception: " + dae.getMessage());
            assertNotNull(dae);
        }
View Full Code Here

    }

    @Test
    public void testGetContacto() throws Exception {
        // set expected behavior on dao
        daoMock.expects(once()).method("get").will(returnValue(new Contacto()));

        bean = manager.get(ID);

        assertTrue(bean != null);
        daoMock.verify();
View Full Code Here

        daoMock.verify();
    }

    @Test
    public void testAddAndRemoveContacto() throws Exception {
        bean = new Contacto();

        // set required fields

        // set expected behavior on dao
        daoMock.expects(once()).method("save").with(same(bean)).isVoid();
View Full Code Here

TOP

Related Classes of org.tennisclub.manager.model.Contacto

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.