diff options
Diffstat (limited to 'sparkybe-onap-service/src/test/java/org/onap/aai/sparky/search/filters/entity/BoolQueryBuilderTest.java')
-rw-r--r-- | sparkybe-onap-service/src/test/java/org/onap/aai/sparky/search/filters/entity/BoolQueryBuilderTest.java | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/sparkybe-onap-service/src/test/java/org/onap/aai/sparky/search/filters/entity/BoolQueryBuilderTest.java b/sparkybe-onap-service/src/test/java/org/onap/aai/sparky/search/filters/entity/BoolQueryBuilderTest.java new file mode 100644 index 0000000..df2d0e9 --- /dev/null +++ b/sparkybe-onap-service/src/test/java/org/onap/aai/sparky/search/filters/entity/BoolQueryBuilderTest.java @@ -0,0 +1,31 @@ +package org.onap.aai.sparky.search.filters.entity; + +import static org.junit.Assert.assertNotNull; + +import org.junit.Before; +import org.junit.Test; + +public class BoolQueryBuilderTest { + + private BoolQueryBuilder boolQueryBuilder; + private MatchFilterCriteriaEntity matchQueryEntity; + + @Before + public void init() throws Exception { + + boolQueryBuilder = new BoolQueryBuilder(); + matchQueryEntity = new MatchFilterCriteriaEntity("Criteria-1", "Value-1"); + + } + + @Test + public void updateValues() { + + boolQueryBuilder.addShouldFilter(matchQueryEntity); + boolQueryBuilder.addMustFilter(matchQueryEntity); + boolQueryBuilder.isMatchAll(); + assertNotNull(boolQueryBuilder.getJsonObject()); + boolQueryBuilder.setMinShouldMatch(25); + + } +} |