Package org.tennisclub.manager.model

Examples of org.tennisclub.manager.model.Socio


    public String edit() {
        // Comparison to zero (vs. null) is required with MyFaces 1.2.2, not with previous versions
        if (id != null && id != 0) {
            socio = socioManager.get(id);
        } else {
            socio = new Socio();
        }

        return "edit";
    }
View Full Code Here


        this.dao = dao;
    }

    @Test
    public void testAddAndRemoveSocio() throws Exception {
        Socio socio = new Socio();

        // enter all required fields

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

        assertNotNull(socio.getId());

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

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

    }

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

        bean = manager.get(ID);

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

        daoMock.verify();
    }

    @Test
    public void testAddAndRemoveSocio() throws Exception {
        bean = new Socio();

        // 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.Socio

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.