use of org.apache.syncope.core.persistence.api.entity.AnyTypeClass in project syncope by apache.
the class AnyTypeClassTest method delete.
@Test
public void delete() {
AnyTypeClass minimalUser = anyTypeClassDAO.find("minimal user");
assertNotNull(minimalUser);
anyTypeClassDAO.delete(minimalUser.getKey());
assertNull(anyTypeClassDAO.find("minimal user"));
}
use of org.apache.syncope.core.persistence.api.entity.AnyTypeClass in project syncope by apache.
the class AnyTypeClassTest method save.
@Test
public void save() {
AnyTypeClass newClass = entityFactory.newEntity(AnyTypeClass.class);
newClass.setKey("new class");
newClass.add(plainSchemaDAO.find("firstname"));
newClass = anyTypeClassDAO.save(newClass);
assertNotNull(newClass);
assertFalse(newClass.getPlainSchemas().isEmpty());
assertTrue(newClass.getDerSchemas().isEmpty());
assertTrue(newClass.getVirSchemas().isEmpty());
}
Aggregations