Examples of Permissao


Examples of br.facet.tcc.pojo.Permissao

     * {@link br.facet.tcc.impl.dao.DaoConfiguration#salvar(java.lang.Object)}.
     */
    @Test
    public void testSalvar() throws DaoException {

        Permissao permissao = new Permissao();

        permissao.setRole(UserRoles.ROLE_ADM);

        Integer codigo = this.getPermissaoDao().salvar(permissao);
        Assert.assertTrue("Permissao nao foi salva. ", codigo > 0);
    }
View Full Code Here

Examples of br.facet.tcc.pojo.Permissao

     * {@link br.facet.tcc.impl.dao.DaoConfiguration#atualizar(java.lang.Object)}
     * .
     */
    @Test
    public void testAtualizar() throws DaoException {
        Permissao permissao = this.getPermissaoDao().listar(Permissao.class)
                .get(0);
        UserRoles expected = permissao.getRole();
        permissao.setRole(UserRoles.ROLE_USR);
        this.getPermissaoDao().atualizar(permissao);

        UserRoles actual = this.getPermissaoDao().listar(Permissao.class)
                .get(0).getRole();
        Assert.assertNotSame("Tipos de permissao s�o diferentes", expected,
View Full Code Here

Examples of br.facet.tcc.pojo.Permissao

     */
    @Test
    public void testExcluir() throws DaoException {
        int unexpected = this.getPermissaoDao().listar(Permissao.class).size();

        Permissao permissao = this.getPermissaoDao().listar(Permissao.class)
                .get(0);

        this.getPermissaoDao().excluir(permissao);

        int actual = this.getPermissaoDao().listar(Permissao.class).size();
View Full Code Here

Examples of br.facet.tcc.pojo.Permissao

     * {@link br.facet.tcc.impl.dao.DaoConfiguration#pesquisar(java.lang.Object)}
     * .
     */
    @Test
    public void testPesquisar() throws DaoException {
        Permissao permissao = new Permissao();
        permissao.setRole(UserRoles.ROLE_USR);
        List<Permissao> permissao1 = this.getPermissaoDao()
                .pesquisar(permissao);

        Assert.assertFalse(permissao1.isEmpty());
    }
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.