Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Parmet <[email protected]>
  • Loading branch information
andrewparmet committed Sep 21, 2023
1 parent cc90da4 commit 8ba5998
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
import org.opensearch.client.opensearch._types.query_dsl.ShapeQuery;
import org.opensearch.client.opensearch._types.query_dsl.TermQuery;
import org.opensearch.client.json.JsonData;
import org.opensearch.client.opensearch._types.query_dsl.WrapperQuery;
import org.opensearch.client.util.MapBuilder;
import org.junit.Test;

Expand Down Expand Up @@ -84,6 +85,19 @@ public void testAdditionalPropertyOnClass() {
System.out.println(toJson(q));
}

@Test
public void testWrapperQuery() {
WrapperQuery q = new WrapperQuery.Builder()
.query("encoded_query")
.build();

q = checkJsonRoundtrip(q,
"{\"query\":\"encoded_query\"}"
);

assertEquals("encoded_query", q.query());
}

@Test
public void testAdditionalPropertyOnContainer() {
// Regular variant
Expand Down

0 comments on commit 8ba5998

Please sign in to comment.