Skip to content

Commit

Permalink
Path2 test
Browse files Browse the repository at this point in the history
  • Loading branch information
sazzad16 committed Nov 19, 2021
1 parent a91a2e8 commit 742d913
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package redis.clients.jedis.tests.modules.json;

import static org.junit.Assert.assertEquals;

import org.junit.Test;
import redis.clients.jedis.json.Path2;

public class Path2Test {

@Test
public void test() {
assertEquals("$", Path2.ROOT_PATH.toString());
assertEquals("$.a.b", Path2.of("$.a.b").toString());
assertEquals("$.a.b", new Path2("$.a.b").toString());
assertEquals("$.a.b", Path2.of(".a.b").toString());
assertEquals("$.a.b", new Path2(".a.b").toString());
assertEquals("$.a.b", Path2.of("a.b").toString());
assertEquals("$.a.b", new Path2("a.b").toString());
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package redis.clients.jedis.tests.modules.json;

import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;

import org.junit.Test;
import redis.clients.jedis.json.Path;
Expand Down

0 comments on commit 742d913

Please sign in to comment.