X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=src%2Ftest%2Fjava%2Forg%2Fonap%2Faai%2Fsa%2Fsearchdbabstraction%2Fsearchapi%2FFilterTest.java;h=81fa07f9bcfbb55447ae3283623521fafb8ffbd4;hb=15af66b115f3e8046b2d0f2634fb77b3d835f730;hp=c4e2d4920aefdbd8eb7c7906cf84a6dafc9615f0;hpb=22c477621c40c4762cceb67a1d18749bff68fb87;p=aai%2Fsearch-data-service.git diff --git a/src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/FilterTest.java b/src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/FilterTest.java index c4e2d49..81fa07f 100644 --- a/src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/FilterTest.java +++ b/src/test/java/org/onap/aai/sa/searchdbabstraction/searchapi/FilterTest.java @@ -2,8 +2,8 @@ * ============LICENSE_START======================================================= * org.onap.aai * ================================================================================ - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. - * Copyright © 2017 Amdocs + * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved. + * Copyright © 2017-2018 Amdocs * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,36 +17,27 @@ * See the License for the specific language governing permissions and * limitations under the License. * ============LICENSE_END========================================================= - * - * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ package org.onap.aai.sa.searchdbabstraction.searchapi; import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.ObjectMapper; -import org.junit.Test; -import org.onap.aai.sa.searchdbabstraction.searchapi.Filter; - import java.io.IOException; +import org.junit.Test; public class FilterTest { - @Test - public void test() throws JsonParseException, JsonMappingException, IOException { + @Test + public void test() throws JsonParseException, JsonMappingException, IOException { - String json = "{ \"any\": [ " - + "{\"match\": {\"field\": \"searchTags\", \"value\": \"a\"}}," - + "{\"match\": {\"field\": \"searchTags\", \"value\": \"b\"}}" - + "]," - + "\"all\": [" - + "{\"parsed-query\": {\"field\": \"fieldname\", \"query-string\": \"string\"}}" - + "]" - + "}"; + String json = "{ \"any\": [ " + "{\"match\": {\"field\": \"searchTags\", \"value\": \"a\"}}," + + "{\"match\": {\"field\": \"searchTags\", \"value\": \"b\"}}" + "]," + "\"all\": [" + + "{\"parsed-query\": {\"field\": \"fieldname\", \"query-string\": \"string\"}}" + "]" + "}"; - ObjectMapper mapper = new ObjectMapper(); - Filter filter = mapper.readValue(json, Filter.class); - System.out.println("GDF: filter = " + filter); - } + ObjectMapper mapper = new ObjectMapper(); + Filter filter = mapper.readValue(json, Filter.class); + System.out.println("GDF: filter = " + filter); + } }