Adjust sparky parent pom
[aai/sparky-be.git] / sparkybe-onap-service / src / test / java / org / onap / aai / sparky / viewandinspect / entity / NodeProcessingTransactionTest.java
1 /**
2  * ============LICENSE_START=======================================================
3  * org.onap.aai
4  * ================================================================================
5  * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
6  * Copyright © 2017-2018 Amdocs
7  * ================================================================================
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  *       http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  * ============LICENSE_END=========================================================
20  */
21
22 package org.onap.aai.sparky.viewandinspect.entity;
23
24 import static org.junit.Assert.assertEquals;
25 import static org.junit.Assert.assertFalse;
26 import static org.junit.Assert.assertNotNull;
27 import static org.junit.Assert.assertNull;
28 import static org.junit.Assert.assertTrue;
29
30 import java.util.ArrayList;
31
32 import org.junit.Before;
33 import org.junit.Test;
34 import org.onap.aai.restclient.client.OperationResult;
35 import org.onap.aai.sparky.config.oxm.OxmEntityLookup;
36 import org.onap.aai.sparky.viewandinspect.config.VisualizationConfigs;
37
38 public class NodeProcessingTransactionTest {
39         
40
41         private NodeProcessingTransaction nodeProcessingTransaction;
42          private ActiveInventoryNode activeInventoryNode; 
43                 private ArrayList<String> lst = new ArrayList<String>();
44                  private OperationResult opResult; 
45                  private VisualizationConfigs visualConfig; 
46                  private OxmEntityLookup oxmEntityLookup;
47         
48         @Before
49           public void init() throws Exception {
50                 
51                  visualConfig = new VisualizationConfigs(); 
52                  oxmEntityLookup = new OxmEntityLookup();
53                  opResult = new OperationResult();
54                 activeInventoryNode = new ActiveInventoryNode(visualConfig,oxmEntityLookup);
55                 nodeProcessingTransaction = new NodeProcessingTransaction();
56               
57           }
58         
59         
60         @Test 
61         public void updateValues() {
62                 
63                 nodeProcessingTransaction.setRequestParameters("");
64                 assertNotNull(nodeProcessingTransaction.getRequestParameters());
65                 nodeProcessingTransaction.setProcessingNode(activeInventoryNode);
66                 assertNotNull(nodeProcessingTransaction.getProcessingNode());
67                 nodeProcessingTransaction.setOpResult(opResult);
68                 assertNotNull(nodeProcessingTransaction.getOpResult());
69                 assertNull(nodeProcessingTransaction.getSelfLink());
70                 assertNotNull(nodeProcessingTransaction.getSelfLinkWithModifiers());
71                 assertTrue(nodeProcessingTransaction.processingErrorOccurred());
72                 assertNotNull(nodeProcessingTransaction.toString());
73                 nodeProcessingTransaction.setProcessingNode(null);
74                 assertNull(nodeProcessingTransaction.getProcessingNode());
75                 nodeProcessingTransaction.setOpResult(null);
76                 assertNull(nodeProcessingTransaction.getOpResult());
77                 assertNull(nodeProcessingTransaction.getSelfLink());
78                 assertNull(nodeProcessingTransaction.getSelfLinkWithModifiers());
79                 assertNotNull(nodeProcessingTransaction.toString());
80                 
81         }
82
83 }