Skip to content

Commit 8b2e385

Browse files
committed
fix test and add new wildcard test (* on array of object) #70
1 parent 0438e1e commit 8b2e385

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

src/test/java/com/dashjoin/jsonata/ArrayTest.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,18 @@ public void testSortNull() {
4949
Assertions.assertEquals(Arrays.asList(Map.of("x", 2), Map.of("x", 1)), expr.evaluate(null));
5050
}
5151

52+
@Disabled
53+
@Test
54+
public void testWildcard() {
55+
Jsonata expr = jsonata("*");
56+
Assertions.assertEquals(Map.of("x", 1), expr.evaluate(List.of(Map.of("x", 1))));
57+
}
58+
5259
@Disabled
5360
@Test
5461
public void testWildcardFilter() {
55-
Object value1 = Map.of("value", Map.of(Map.of("Name", "Cell1"), Map.of("Product", "Product1")));
56-
Object value2 = Map.of("value", Map.of(Map.of("Name", "Cell2"), Map.of("Product", "Product2")));
62+
Object value1 = Map.of("value", Map.of("Name", "Cell1", "Product", "Product1"));
63+
Object value2 = Map.of("value", Map.of("Name", "Cell2", "Product", "Product2"));
5764
Object data = List.of(value1, value2);
5865

5966
// Expecting the first object in the array

0 commit comments

Comments
 (0)