File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
src/test/java/com/redislabs/modules/rejson Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 3636
3737import static junit .framework .TestCase .*;
3838
39+ import java .util .List ;
40+
3941public class ClientTest {
4042
4143 /* A simple class that represents an object in real life */
@@ -51,9 +53,17 @@ public IRLObject() {
5153
5254 private static class FooBarObject {
5355 public String foo ;
56+ public boolean fooB ;
57+ public int fooI ;
58+ public float fooF ;
59+ public String [] fooArr ;
5460
5561 public FooBarObject () {
5662 this .foo = "bar" ;
63+ this .fooB = true ;
64+ this .fooI = 6574 ;
65+ this .fooF = 435.345f ;
66+ this .fooArr = new String []{"a" , "b" ,"c" };
5767 }
5868 }
5969
@@ -165,6 +175,10 @@ public void typeChecksShouldSucceed() throws Exception {
165175 assertSame (Object .class , client .type ( "foobar" ));
166176 assertSame (Object .class , client .type ( "foobar" , Path .ROOT_PATH ));
167177 assertSame (String .class , client .type ( "foobar" , new Path (".foo" )));
178+ assertSame (int .class , client .type ( "foobar" , new Path (".fooI" )));
179+ assertSame (float .class , client .type ( "foobar" , new Path (".fooF" )));
180+ assertSame (List .class , client .type ( "foobar" , new Path (".fooArr" )));
181+ assertSame (boolean .class , client .type ( "foobar" , new Path (".fooB" )));
168182 }
169183
170184 @ Test (expected = Exception .class )
You can’t perform that action at this time.
0 commit comments