Search in sources :

Example 1 with PersonAttributesGroupDefinitionImpl

use of org.apereo.portal.groups.pags.dao.jpa.PersonAttributesGroupDefinitionImpl in project uPortal by Jasig.

the class PagsRESTControllerTest method testFindPagsGroup.

@Test
public void testFindPagsGroup() throws JsonProcessingException {
    String groupName = "groupname";
    IPerson person = new PersonImpl();
    person.setUserName(USER_NAME);
    person.setFullName("john doe");
    Mockito.when(personManager.getPerson(req)).thenReturn(person);
    IPersonAttributesGroupDefinition pagsGroup = new PersonAttributesGroupDefinitionImpl(groupName, "this is awesome");
    Mockito.when(pagsService.getPagsDefinitionByName(person, groupName)).thenReturn(pagsGroup);
    pagsRESTController.findPagsGroup(req, res, "groupname");
    Mockito.verify(mapper).writeValueAsString(pagsGroup);
}
Also used : IPerson(org.apereo.portal.security.IPerson) IPersonAttributesGroupDefinition(org.apereo.portal.groups.pags.dao.IPersonAttributesGroupDefinition) PersonImpl(org.apereo.portal.security.provider.PersonImpl) PersonAttributesGroupDefinitionImpl(org.apereo.portal.groups.pags.dao.jpa.PersonAttributesGroupDefinitionImpl) Test(org.junit.Test)

Aggregations

IPersonAttributesGroupDefinition (org.apereo.portal.groups.pags.dao.IPersonAttributesGroupDefinition)1 PersonAttributesGroupDefinitionImpl (org.apereo.portal.groups.pags.dao.jpa.PersonAttributesGroupDefinitionImpl)1 IPerson (org.apereo.portal.security.IPerson)1 PersonImpl (org.apereo.portal.security.provider.PersonImpl)1 Test (org.junit.Test)1