Initial commit for AAI-UI(sparky-backend)
[aai/sparky-be.git] / src / test / java / org / openecomp / sparky / viewandinspect / SearchResponseTest.java
1 /* 
2 * ============LICENSE_START=======================================================
3 * SPARKY (inventory UI service)
4 * ================================================================================
5 * Copyright © 2017 AT&T Intellectual Property.
6 * Copyright © 2017 Amdocs
7 * All rights reserved.
8 * ================================================================================
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file 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 * ============LICENSE_END=========================================================
21
22 * ECOMP and OpenECOMP are trademarks
23 * and service marks of AT&T Intellectual Property.
24 */
25
26 package org.openecomp.sparky.viewandinspect;
27
28 import java.util.ArrayList;
29 import java.util.List;
30
31 import org.junit.Before;
32 import org.junit.Test;
33 import org.junit.runner.RunWith;
34 import org.openecomp.sparky.viewandinspect.entity.EntityEntry;
35 import org.openecomp.sparky.viewandinspect.entity.SearchResponse;
36 import org.powermock.modules.junit4.PowerMockRunner;
37
38 /**
39  * The Class SearchResponseTest.
40  */
41 @RunWith(PowerMockRunner.class)
42 public class SearchResponseTest {
43
44   /**
45    * Inits the.
46    *
47    * @throws Exception the exception
48    */
49   @Before
50   public void init() throws Exception {}
51
52   /**
53    * Validate basic construction.
54    */
55   @Test
56   public void validateBasicConstruction() {
57
58     SearchResponse response = new SearchResponse();
59
60     //response.setNumReturned(1);
61     response.setProcessingTimeInMs(512);
62     //response.setTotalFound(50);
63
64     List<EntityEntry> entities = new ArrayList<EntityEntry>();
65     //response.setEntities(entities);
66
67     EntityEntry e1 = new EntityEntry();
68     e1.setEntityPrimaryKeyValue("e1");
69     e1.setEntityType("e1");
70     e1.setSearchTags("e1");
71
72     //response.addEntityEntry(e1);
73
74     EntityEntry e2 = new EntityEntry();
75
76     e2.setEntityPrimaryKeyValue("e2");
77     e2.setEntityType("e2");
78     e2.setSearchTags("e2");
79
80     //response.addEntityEntry(e2);
81
82     //assertEquals(1, response.getNumReturned());
83     //assertEquals(512, response.getProcessingTimeInMs());
84     //assertEquals(50, response.getTotalFound());
85
86     //List<EntityEntry> responseEntities = response.getEntities();
87
88     //assertEquals(2, responseEntities.size());
89
90   }
91
92 }