use of org.apache.syncope.core.persistence.api.entity.RelationshipType in project syncope by apache.
the class RelationshipTypeTest method find.
@Test
public void find() {
RelationshipType inclusion = relationshipTypeDAO.find("inclusion");
assertNotNull(inclusion);
assertEquals("inclusion", inclusion.getKey());
}
use of org.apache.syncope.core.persistence.api.entity.RelationshipType in project syncope by apache.
the class RelationshipTypeTest method delete.
@Test
public void delete() {
RelationshipType type = relationshipTypeDAO.find("neighborhood");
assertNotNull(type);
relationshipTypeDAO.delete(type.getKey());
assertNull(relationshipTypeDAO.find("neighborhood"));
}
use of org.apache.syncope.core.persistence.api.entity.RelationshipType in project syncope by apache.
the class RelationshipTypeTest method deleteOnAnyObject.
@Test
public void deleteOnAnyObject() {
RelationshipType neighborhood = relationshipTypeDAO.find("neighborhood");
assertNotNull(neighborhood);
AnyObject anyObject = anyObjectDAO.find("fc6dbc3a-6c07-4965-8781-921e7401a4a5");
assertNotNull(anyObject);
assertNotNull(anyObject.getRelationships(neighborhood));
assertFalse(anyObject.getRelationships(neighborhood).isEmpty());
relationshipTypeDAO.delete("neighborhood");
relationshipTypeDAO.flush();
anyObject = anyObjectDAO.find("fc6dbc3a-6c07-4965-8781-921e7401a4a5");
assertNotNull(anyObject);
assertTrue(anyObject.getRelationships().isEmpty());
}
Aggregations