f0344751601f7d84906bee1e6b7137fbe2ac156f
[portal.git] / ecomp-portal-BE-common / src / test / java / org / onap / portalapp / portal / transport / EcompUserAppRolesTest.java
1
2 /*-
3  * ============LICENSE_START==========================================
4  * ONAP Portal
5  * ===================================================================
6  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
7  * ===================================================================
8  *
9  * Unless otherwise specified, all software contained herein is licensed
10  * under the Apache License, Version 2.0 (the "License");
11  * you may not use this software except in compliance with the License.
12  * You may obtain a copy of the License at
13  *
14  *             http://www.apache.org/licenses/LICENSE-2.0
15  *
16  * Unless required by applicable law or agreed to in writing, software
17  * distributed under the License is distributed on an "AS IS" BASIS,
18  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19  * See the License for the specific language governing permissions and
20  * limitations under the License.
21  *
22  * Unless otherwise specified, all documentation contained herein is licensed
23  * under the Creative Commons License, Attribution 4.0 Intl. (the "License");
24  * you may not use this documentation except in compliance with the License.
25  * You may obtain a copy of the License at
26  *
27  *             https://creativecommons.org/licenses/by/4.0/
28  *
29  * Unless required by applicable law or agreed to in writing, documentation
30  * distributed under the License is distributed on an "AS IS" BASIS,
31  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32  * See the License for the specific language governing permissions and
33  * limitations under the License.
34  *
35  * ============LICENSE_END============================================
36  *
37  * 
38  */package org.onap.portalapp.portal.transport;
39
40 import static org.junit.Assert.assertEquals;
41
42 import org.junit.Test;
43 import org.onap.portalapp.portal.transport.EcompUserAppRoles;
44
45 public class EcompUserAppRolesTest {
46
47         public EcompUserAppRoles mockEcompUserAppRoles(){
48                 EcompUserAppRoles ecompUserAppRoles = new EcompUserAppRoles();
49                         
50                 ecompUserAppRoles.setAppId("test");
51                 ecompUserAppRoles.setUserId((long)1);
52                 ecompUserAppRoles.setPriority("test");
53                 ecompUserAppRoles.setRoleId((long)1);
54                 ecompUserAppRoles.setRoleName("test");
55                 
56                 return ecompUserAppRoles;
57         }
58         
59         @Test
60         public void ecompUserAppRolesTest(){
61                 
62                 EcompUserAppRoles ecompUserAppRoles = mockEcompUserAppRoles();
63                 
64                 assertEquals(ecompUserAppRoles.getAppId(), "test");
65                 assertEquals(ecompUserAppRoles.getPriority(), "test");
66                 assertEquals(ecompUserAppRoles.getRoleName(), "test");
67                 assertEquals(ecompUserAppRoles.getUserId(), new Long(1));
68                 assertEquals(ecompUserAppRoles.getRoleId(), new Long(1));
69         }
70 }