Search in sources :

Example 6 with Application

use of org.apache.syncope.core.persistence.api.entity.Application in project syncope by apache.

the class ApplicationTest method find.

@Test
public void find() {
    Application mightyApp = applicationDAO.find("mightyApp");
    assertNotNull(mightyApp);
    assertEquals(2, mightyApp.getPrivileges().size());
    Privilege getMighty = applicationDAO.findPrivilege("getMighty");
    assertNotNull(getMighty);
    assertEquals(getMighty, mightyApp.getPrivilege("getMighty").get());
}
Also used : Privilege(org.apache.syncope.core.persistence.api.entity.Privilege) Application(org.apache.syncope.core.persistence.api.entity.Application) Test(org.junit.jupiter.api.Test) AbstractTest(org.apache.syncope.core.persistence.jpa.AbstractTest)

Aggregations

Application (org.apache.syncope.core.persistence.api.entity.Application)6 Privilege (org.apache.syncope.core.persistence.api.entity.Privilege)3 ApplicationTO (org.apache.syncope.common.lib.to.ApplicationTO)2 ApplicationDAO (org.apache.syncope.core.persistence.api.dao.ApplicationDAO)2 AbstractTest (org.apache.syncope.core.persistence.jpa.AbstractTest)2 Test (org.junit.jupiter.api.Test)2 ParseException (java.text.ParseException)1 ArrayList (java.util.ArrayList)1 Collections (java.util.Collections)1 Date (java.util.Date)1 HashSet (java.util.HashSet)1 Iterator (java.util.Iterator)1 List (java.util.List)1 Optional (java.util.Optional)1 Set (java.util.Set)1 Collectors (java.util.stream.Collectors)1 BooleanUtils (org.apache.commons.lang3.BooleanUtils)1 StringUtils (org.apache.commons.lang3.StringUtils)1 FieldUtils (org.apache.commons.lang3.reflect.FieldUtils)1 DateFormatUtils (org.apache.commons.lang3.time.DateFormatUtils)1