2 * ============LICENSE_START==========================================
4 * ===================================================================
5 * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
6 * ===================================================================
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
13 * http://www.apache.org/licenses/LICENSE-2.0
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.
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
26 * https://creativecommons.org/licenses/by/4.0/
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.
34 * ============LICENSE_END============================================
36 * ECOMP is a trademark and service mark of AT&T Intellectual Property.
38 package org.onap.portalsdk.rnotebookintegration.domain;
40 import org.junit.Assert;
41 import org.junit.Test;
43 public class RNoteBookCredentialsTest {
45 public RNoteBookCredentials mockRNoteBookCredentials(){
46 RNoteBookCredentials rNoteBookCredentials = new RNoteBookCredentials();
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");
58 return rNoteBookCredentials;
62 public void rNoteBookCredentialsTest(){
63 RNoteBookCredentials rNoteBookCredentials1 = mockRNoteBookCredentials();
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");
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());