2 * ============LICENSE_START=======================================================
3 * SPARKY (inventory UI service)
4 * ================================================================================
5 * Copyright © 2017 AT&T Intellectual Property.
6 * Copyright © 2017 Amdocs
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
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.
20 * ============LICENSE_END=========================================================
22 * ECOMP and OpenECOMP are trademarks
23 * and service marks of AT&T Intellectual Property.
26 package org.openecomp.sparky.viewandinspect;
28 import java.util.ArrayList;
29 import java.util.List;
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;
39 * The Class SearchResponseTest.
41 @RunWith(PowerMockRunner.class)
42 public class SearchResponseTest {
47 * @throws Exception the exception
50 public void init() throws Exception {}
53 * Validate basic construction.
56 public void validateBasicConstruction() {
58 SearchResponse response = new SearchResponse();
60 //response.setNumReturned(1);
61 response.setProcessingTimeInMs(512);
62 //response.setTotalFound(50);
64 List<EntityEntry> entities = new ArrayList<EntityEntry>();
65 //response.setEntities(entities);
67 EntityEntry e1 = new EntityEntry();
68 e1.setEntityPrimaryKeyValue("e1");
69 e1.setEntityType("e1");
70 e1.setSearchTags("e1");
72 //response.addEntityEntry(e1);
74 EntityEntry e2 = new EntityEntry();
76 e2.setEntityPrimaryKeyValue("e2");
77 e2.setEntityType("e2");
78 e2.setSearchTags("e2");
80 //response.addEntityEntry(e2);
82 //assertEquals(1, response.getNumReturned());
83 //assertEquals(512, response.getProcessingTimeInMs());
84 //assertEquals(50, response.getTotalFound());
86 //List<EntityEntry> responseEntities = response.getEntities();
88 //assertEquals(2, responseEntities.size());