Skip to content

Commit

Permalink
Add test for CompositeDateHistogramAggregationSource
Browse files Browse the repository at this point in the history
Signed-off-by: Fabien Crespel <[email protected]>
  • Loading branch information
fcrespel committed Dec 21, 2024
1 parent 95a3949 commit 10b8cb8
Showing 1 changed file with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*/

package org.opensearch.client.opensearch._types.aggregations;

import org.junit.Test;
import org.opensearch.client.opensearch.model.ModelTestCase;

public class CompositeDateHistogramAggregationSourceTest extends ModelTestCase {

@Test
public void testSerializeSpecificFields() {
String json = "{\"calendar_interval\":\"1d\",\"fixed_interval\":\"1d\",\"offset\":1,\"time_zone\":\"+01:00\"}";
CompositeDateHistogramAggregationSource aggregation = fromJson(json, CompositeDateHistogramAggregationSource._DESERIALIZER);
assertEquals(json, toJson(aggregation));
}

}

0 comments on commit 10b8cb8

Please sign in to comment.