Search in sources :

Example 6 with VsSystemDto

use of eu.bcvsolutions.idm.vs.dto.VsSystemDto in project CzechIdMng by bcvsolutions.

the class VsSystemServiceTest method checkImplementersTest.

@Test
public void checkImplementersTest() {
    String userOneName = "vsUserOne";
    String roleOneName = "vsRoleOne";
    IdmIdentityDto userOne = helper.createIdentity(userOneName);
    IdmRoleDto roleOne = helper.createRole(roleOneName);
    VsSystemDto config = new VsSystemDto();
    config.setName(VS_SYSTEM);
    config.setImplementers(ImmutableList.of(userOne.getId()));
    config.setImplementerRoles(ImmutableList.of(roleOne.getId()));
    SysSystemDto system = helper.createVirtualSystem(config);
    Assert.assertNotNull(system);
    List<IdmIdentityDto> implementes = systemImplementersService.findRequestImplementers(system.getId());
    Assert.assertEquals(1, implementes.size());
    Assert.assertEquals(userOneName, implementes.get(0).getUsername());
}
Also used : IdmRoleDto(eu.bcvsolutions.idm.core.api.dto.IdmRoleDto) VsSystemDto(eu.bcvsolutions.idm.vs.dto.VsSystemDto) IdmIdentityDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto) SysSystemDto(eu.bcvsolutions.idm.acc.dto.SysSystemDto) Test(org.junit.Test) AbstractIntegrationTest(eu.bcvsolutions.idm.test.api.AbstractIntegrationTest)

Aggregations

VsSystemDto (eu.bcvsolutions.idm.vs.dto.VsSystemDto)6 SysSystemDto (eu.bcvsolutions.idm.acc.dto.SysSystemDto)5 IdmIdentityDto (eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto)4 AbstractIntegrationTest (eu.bcvsolutions.idm.test.api.AbstractIntegrationTest)4 Test (org.junit.Test)4 IdmRoleDto (eu.bcvsolutions.idm.core.api.dto.IdmRoleDto)2 Date (java.util.Date)1