1 package org.openecomp.portalapp.portal.transport;
3 import static org.junit.Assert.*;
5 import java.util.HashSet;
9 import org.openecomp.portalapp.portal.transport.CentralRole;
10 import org.openecomp.portalapp.portal.transport.CentralUser;
11 import org.openecomp.portalapp.portal.transport.CentralUserApp;
13 public class CentralUserTest {
15 public CentralUser mockCentralUser(){
16 Set<CentralUserApp> userApps = new HashSet<CentralUserApp>();
17 Set<CentralRole> pseudoRoles = new HashSet<CentralRole>();
18 CentralUser centralUser = new CentralUser((long)1, null, null, (long)1, (long)1, (long)1, (long)1,
19 (long)1, "test", "test", "test", "test", "test",
20 "test", "test", (long)1, "test", "test", "test",
21 "test", "test", "test", "test", "test", "test", "test",
22 "test", "test", "test", "test",
23 "test", "test", "test", "test", "test",
24 "test", "test", "test", "test", "test",
25 "test", "test", "test", "test", null,
26 false, false, (long)1, (long)1, false, "test", userApps, pseudoRoles);
32 public void centralRoleTest(){
33 CentralUser centralUser = mockCentralUser();
35 Set<CentralUserApp> userApps = new HashSet<CentralUserApp>();
36 Set<CentralRole> pseudoRoles = new HashSet<CentralRole>();
37 CentralUser centralUser1 = new CentralUser((long)1, null, null, (long)1, (long)1, (long)1, (long)1,
38 (long)1, "test", "test", "test", "test", "test",
39 "test", "test", (long)1, "test", "test", "test",
40 "test", "test", "test", "test", "test", "test", "test",
41 "test", "test", "test", "test",
42 "test", "test", "test", "test", "test",
43 "test", "test", "test", "test", "test",
44 "test", "test", "test", "test", null,
45 false, false, (long)1, (long)1, false, "test", userApps, pseudoRoles);
48 assertEquals(centralUser, centralUser1);
49 assertEquals(centralUser.hashCode(), centralUser1.hashCode());
50 assertTrue(centralUser.equals(centralUser1));