12dc1e694936d29ffab29815872d58ada5ffd611
[portal/sdk.git] /
1 /*
2  * ============LICENSE_START==========================================
3  * ONAP Portal SDK
4  * ===================================================================
5  * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
6  * ===================================================================
7  *
8  * Unless otherwise specified, all software contained herein is licensed
9  * under the Apache License, Version 2.0 (the "License");
10  * you may not use this software except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  *             http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  *
21  * Unless otherwise specified, all documentation contained herein is licensed
22  * under the Creative Commons License, Attribution 4.0 Intl. (the "License");
23  * you may not use this documentation except in compliance with the License.
24  * You may obtain a copy of the License at
25  *
26  *             https://creativecommons.org/licenses/by/4.0/
27  *
28  * Unless required by applicable law or agreed to in writing, documentation
29  * distributed under the License is distributed on an "AS IS" BASIS,
30  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
31  * See the License for the specific language governing permissions and
32  * limitations under the License.
33  *
34  * ============LICENSE_END============================================
35  *
36  * ECOMP is a trademark and service mark of AT&T Intellectual Property.
37  */
38 package org.onap.portalsdk.rnotebookintegration.domain;
39
40 import org.junit.Assert;
41 import org.junit.Test;
42
43 public class RNoteBookCredentialsTest {
44
45         public RNoteBookCredentials mockRNoteBookCredentials(){
46                 RNoteBookCredentials rNoteBookCredentials = new RNoteBookCredentials();
47                             
48                 rNoteBookCredentials.setUserInfo(null);
49                 rNoteBookCredentials.setToken("test");     
50                 rNoteBookCredentials.setCreated(null);
51                 rNoteBookCredentials.setCreatedDate(null);
52                 rNoteBookCredentials.setNotebookID("test");
53                 rNoteBookCredentials.setParameters(null);
54                 rNoteBookCredentials.setTokenReadDate(null);
55                 rNoteBookCredentials.setUserString("test");
56                 rNoteBookCredentials.setParametersString("test");       
57             
58                 return rNoteBookCredentials;                    
59         }
60         
61         @Test
62         public void rNoteBookCredentialsTest(){
63                 RNoteBookCredentials rNoteBookCredentials1 = mockRNoteBookCredentials();
64                 
65                 RNoteBookCredentials rNoteBookCredentials = new RNoteBookCredentials();
66                 rNoteBookCredentials.setUserInfo(null);
67                 rNoteBookCredentials.setToken("test");     
68                 rNoteBookCredentials.setCreated(null);
69                 rNoteBookCredentials.setNotebookID("test");
70                 rNoteBookCredentials.setParameters(null);
71                 rNoteBookCredentials.setTokenReadDate(null);
72                 rNoteBookCredentials.setUserString("test");
73                 rNoteBookCredentials.setParametersString("test");
74                 
75                 Assert.assertEquals(rNoteBookCredentials.getUserInfo(), rNoteBookCredentials1.getUserInfo());
76                 Assert.assertEquals(rNoteBookCredentials.getToken(), rNoteBookCredentials1.getToken());
77                 Assert.assertEquals(rNoteBookCredentials.getCreated(), rNoteBookCredentials1.getCreated());
78                 Assert.assertEquals(rNoteBookCredentials.getCreatedDate(), rNoteBookCredentials1.getCreatedDate());
79                 Assert.assertEquals(rNoteBookCredentials.getNotebookID(), rNoteBookCredentials1.getNotebookID());
80                 Assert.assertEquals(rNoteBookCredentials.getParameters(), rNoteBookCredentials1.getParameters());
81                 Assert.assertEquals(rNoteBookCredentials.getTokenReadDate(), rNoteBookCredentials1.getTokenReadDate());
82                 Assert.assertEquals(rNoteBookCredentials.getUserString(), rNoteBookCredentials1.getUserString());
83                 Assert.assertEquals(rNoteBookCredentials.getParametersString(), rNoteBookCredentials1.getParametersString());
84         }
85 }