@@ -78,7 +78,7 @@ public void simpleCookieList() {
7878 // validate JSON content
7979 Object doc = Configuration .defaultConfiguration ().jsonProvider ().parse (jsonObject .toString ());
8080 assertTrue ("Expected 1 top level item" , ((Map <?,?>)(JsonPath .read (doc , "$" ))).size () == 1 );
81- assertTrue ("expected 31d4d96e407aad42" , "31d4d96e407aad42" .equals (JsonPath . read ( doc , "$. SID" )));
81+ assertTrue ("expected 31d4d96e407aad42" , "31d4d96e407aad42" .equals (jsonObject . query ( "/ SID" )));
8282 }
8383
8484 /**
@@ -91,7 +91,7 @@ public void simpleCookieListWithDelimiter() {
9191 // validate JSON content
9292 Object doc = Configuration .defaultConfiguration ().jsonProvider ().parse (jsonObject .toString ());
9393 assertTrue ("Expected 1 top level item" , ((Map <?,?>)(JsonPath .read (doc , "$" ))).size () == 1 );
94- assertTrue ("expected 31d4d96e407aad42" , "31d4d96e407aad42" .equals (JsonPath . read ( doc , "$. SID" )));
94+ assertTrue ("expected 31d4d96e407aad42" , "31d4d96e407aad42" .equals (jsonObject . query ( "/ SID" )));
9595 }
9696
9797 /**
@@ -111,12 +111,12 @@ public void multiPartCookieList() {
111111 // validate JSON content
112112 Object doc = Configuration .defaultConfiguration ().jsonProvider ().parse (jsonObject .toString ());
113113 assertTrue ("Expected 6 top level items" , ((Map <?,?>)(JsonPath .read (doc , "$" ))).size () == 6 );
114- assertTrue ("expected myCookieValue1" , "myCookieValue1" .equals (JsonPath . read ( doc , "$. name1" )));
115- assertTrue ("expected myCookieValue2" , "myCookieValue2" .equals (JsonPath . read ( doc , "$. name2" )));
116- assertTrue ("expected myCookieValue3" , "myCookieValue3" .equals (JsonPath . read ( doc , "$. name3" )));
117- assertTrue ("expected myCookieValue4" , "myCookieValue4" .equals (JsonPath . read ( doc , "$. name4" )));
118- assertTrue ("expected myCookieValue5" , "myCookieValue5" .equals (JsonPath . read ( doc , "$. name5" )));
119- assertTrue ("expected myCookieValue6" , "myCookieValue6" .equals (JsonPath . read ( doc , "$. name6" )));
114+ assertTrue ("expected myCookieValue1" , "myCookieValue1" .equals (jsonObject . query ( "/ name1" )));
115+ assertTrue ("expected myCookieValue2" , "myCookieValue2" .equals (jsonObject . query ( "/ name2" )));
116+ assertTrue ("expected myCookieValue3" , "myCookieValue3" .equals (jsonObject . query ( "/ name3" )));
117+ assertTrue ("expected myCookieValue4" , "myCookieValue4" .equals (jsonObject . query ( "/ name4" )));
118+ assertTrue ("expected myCookieValue5" , "myCookieValue5" .equals (jsonObject . query ( "/ name5" )));
119+ assertTrue ("expected myCookieValue6" , "myCookieValue6" .equals (jsonObject . query ( "/ name6" )));
120120 }
121121
122122 /**
@@ -151,12 +151,12 @@ public void convertCookieListToString() {
151151 // validate JSON content
152152 Object doc = Configuration .defaultConfiguration ().jsonProvider ().parse (jsonObject .toString ());
153153 assertTrue ("Expected 6 top level items" , ((Map <?,?>)(JsonPath .read (doc , "$" ))).size () == 6 );
154- assertTrue ("expected myCookieValue1" , "myCookieValue1" .equals (JsonPath . read ( doc , "$. name1" )));
155- assertTrue ("expected myCookieValue2" , "myCookieValue2" .equals (JsonPath . read ( doc , "$. name2" )));
156- assertTrue ("expected myCookieValue3" , "myCookieValue3" .equals (JsonPath . read ( doc , "$. name3" )));
157- assertTrue ("expected myCookieValue4" , "myCookieValue4" .equals (JsonPath . read ( doc , "$. name4" )));
158- assertTrue ("expected myCookieValue5" , "myCookieValue5" .equals (JsonPath . read ( doc , "$. name5" )));
159- assertTrue ("expected myCookieValue6" , "myCookieValue6" .equals (JsonPath . read ( doc , "$. name6" )));
154+ assertTrue ("expected myCookieValue1" , "myCookieValue1" .equals (jsonObject . query ( "/ name1" )));
155+ assertTrue ("expected myCookieValue2" , "myCookieValue2" .equals (jsonObject . query ( "/ name2" )));
156+ assertTrue ("expected myCookieValue3" , "myCookieValue3" .equals (jsonObject . query ( "/ name3" )));
157+ assertTrue ("expected myCookieValue4" , "myCookieValue4" .equals (jsonObject . query ( "/ name4" )));
158+ assertTrue ("expected myCookieValue5" , "myCookieValue5" .equals (jsonObject . query ( "/ name5" )));
159+ assertTrue ("expected myCookieValue6" , "myCookieValue6" .equals (jsonObject . query ( "/ name6" )));
160160 }
161161
162162 /**
@@ -176,11 +176,11 @@ public void convertEncodedCookieListToString() {
176176 // validate JSON content
177177 Object doc = Configuration .defaultConfiguration ().jsonProvider ().parse (jsonObject .toString ());
178178 assertTrue ("Expected 6 top level items" , ((Map <?,?>)(JsonPath .read (doc , "$" ))).size () == 6 );
179- assertTrue ("expected myCookieValue1" , "myCookieValue1" .equals (JsonPath . read ( doc , "$. name1" )));
180- assertTrue ("expected my Cookie Value 2" , "my Cookie Value 2" .equals (JsonPath . read ( doc , "$. name2" )));
181- assertTrue ("expected my+Cookie&Value;3=" , "my+Cookie&Value;3=" .equals (JsonPath . read ( doc , "$. name3" )));
182- assertTrue ("expected my%CookieValue4" , "my%CookieValue4" .equals (JsonPath . read ( doc , "$. name4" )));
183- assertTrue ("expected my%CookieValue5" , "myCookieValue5" .equals (JsonPath . read ( doc , "$. name5" )));
184- assertTrue ("expected myCookieValue6" , "myCookieValue6" .equals (JsonPath . read ( doc , "$. name6" )));
179+ assertTrue ("expected myCookieValue1" , "myCookieValue1" .equals (jsonObject . query ( "/ name1" )));
180+ assertTrue ("expected my Cookie Value 2" , "my Cookie Value 2" .equals (jsonObject . query ( "/ name2" )));
181+ assertTrue ("expected my+Cookie&Value;3=" , "my+Cookie&Value;3=" .equals (jsonObject . query ( "/ name3" )));
182+ assertTrue ("expected my%CookieValue4" , "my%CookieValue4" .equals (jsonObject . query ( "/ name4" )));
183+ assertTrue ("expected my%CookieValue5" , "myCookieValue5" .equals (jsonObject . query ( "/ name5" )));
184+ assertTrue ("expected myCookieValue6" , "myCookieValue6" .equals (jsonObject . query ( "/ name6" )));
185185 }
186186}
0 commit comments