blob: 1863eb96e2493c677dafd4dfd933e5afaa829b1c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
package org.onap.aai.sparky.security;
import static org.junit.Assert.assertNotNull;
import java.util.ArrayList;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mockito;
import org.onap.aai.sparky.security.portal.PortalRestAPICentralServiceImpl;
import org.onap.portalsdk.core.onboarding.exception.PortalAPIException;
import org.onap.portalsdk.core.restful.domain.EcompRole;
public class EcompSsoTest {
private EcompSso ecompSso;
private PortalRestAPICentralServiceImpl portalRestCentralServiceImpl;
@Before
public void init() throws Exception {
ecompSso = new EcompSso();
portalRestCentralServiceImpl = Mockito.mock(PortalRestAPICentralServiceImpl.class);
}
@Test
public void TestValidateUserAccess() throws PortalAPIException {
Mockito.when(portalRestCentralServiceImpl.getUserRoles(Mockito.anyString()))
.thenReturn(new ArrayList<EcompRole>());
assertNotNull(ecompSso.validateUserAccess("ui_view"));
}
}
|