Package org.apache.syncope.core.persistence.beans.user

Examples of org.apache.syncope.core.persistence.beans.user.UVirSchema


        assertNotNull("did not find expected virtual attribute schema", attributeSchema);
    }

    @Test
    public void save() {
        UVirSchema virtualAttributeSchema = new UVirSchema();
        virtualAttributeSchema.setName("virtual");

        virSchemaDAO.save(virtualAttributeSchema);

        UVirSchema actual = virSchemaDAO.find("virtual", UVirSchema.class);
        assertNotNull("expected save to work", actual);
        assertEquals(virtualAttributeSchema, actual);
    }
View Full Code Here


        assertEquals(virtualAttributeSchema, actual);
    }

    @Test
    public void delete() {
        UVirSchema attributeSchema = virSchemaDAO.find("virtualdata", UVirSchema.class);

        virSchemaDAO.delete(attributeSchema.getName(), AttributableUtil.getInstance(AttributableType.USER));

        UVirSchema actual = virSchemaDAO.find("virtualdata", UVirSchema.class);
        assertNull("delete did not work", actual);
    }
View Full Code Here

        assertEquals(2, list.size());
    }

    @Test
    public void findByName() {
        UVirSchema attributeSchema = virSchemaDAO.find("virtualdata", UVirSchema.class);
        assertNotNull("did not find expected virtual attribute schema", attributeSchema);
    }
View Full Code Here

        assertNotNull("did not find expected virtual attribute schema", attributeSchema);
    }

    @Test
    public void save() {
        UVirSchema virtualAttributeSchema = new UVirSchema();
        virtualAttributeSchema.setName("virtual");
        virtualAttributeSchema.setReadonly(true);

        virSchemaDAO.save(virtualAttributeSchema);

        UVirSchema actual = virSchemaDAO.find("virtual", UVirSchema.class);
        assertNotNull("expected save to work", actual);
        assertTrue(actual.isReadonly());
    }
View Full Code Here

        assertTrue(actual.isReadonly());
    }

    @Test
    public void delete() {
        UVirSchema virtualdata = virSchemaDAO.find("virtualdata", UVirSchema.class);

        virSchemaDAO.delete(virtualdata.getName(), AttributableUtil.getInstance(AttributableType.USER));

        AbstractVirSchema actual = virSchemaDAO.find("virtualdata", UVirSchema.class);
        assertNull("delete did not work", actual);

        // ------------- //
View Full Code Here

        assertNull("delete did not work", actual);
    }

    @Test
    public void issueSYNCOPE418() {
        UVirSchema schema = new UVirSchema();
        schema.setName("http://schemas.examples.org/security/authorization/organizationUnit");

        try {
            virSchemaDAO.save(schema);
            fail();
        } catch (InvalidEntityException e) {
View Full Code Here

        assertNotNull("did not find expected attribute schema", attribute);
    }

    @Test
    public void saveUVirAttribute() {
        UVirSchema virSchema = virSchemaDAO.find("virtualdata", UVirSchema.class);
        assertNotNull(virSchema);

        SyncopeUser owner = userDAO.find(3L);
        assertNotNull("did not get expected user", owner);
View Full Code Here

        virAttrDAO.delete(attribute.getId(), UVirAttr.class);

        UVirAttr actual = virAttrDAO.find(1000L, UVirAttr.class);
        assertNull("delete did not work", actual);

        UVirSchema attributeSchema = virSchemaDAO.find(attributeSchemaName, UVirSchema.class);

        assertNotNull("user virtual attribute schema deleted " + "when deleting values", attributeSchema);
    }
View Full Code Here

    public <T extends AbstractVirSchema> T newVirSchema() {
        T result = null;

        switch (type) {
            case USER:
                result = (T) new UVirSchema();
                break;
            case ROLE:
                result = (T) new RVirSchema();
                break;
            case MEMBERSHIP:
View Full Code Here

TOP

Related Classes of org.apache.syncope.core.persistence.beans.user.UVirSchema

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.