@@ -8838,19 +8838,19 @@ public void TestKeepKeyOrder() {
88388838 for (CBORObject key : cbor .getKeys ()) {
88398839 list .add (key );
88408840 }
8841- Assert .assertEquals (CBORObject .FromObject ("1" ),list .get (0 ));
8842- Assert .assertEquals (CBORObject .FromObject ("2" ),list .get (1 ));
8843- Assert .assertEquals (CBORObject .FromObject ("3" ),list .get (2 ));
8841+ Assert .assertEquals (CBORObject .FromObject ("1" ), list .get (0 ));
8842+ Assert .assertEquals (CBORObject .FromObject ("2" ), list .get (1 ));
8843+ Assert .assertEquals (CBORObject .FromObject ("3" ), list .get (2 ));
88448844
88458845 jsonstring = "{\" 3\" :0,\" 2\" :0,\" 1\" :0}" ;
88468846 cbor = CBORObject .FromJSONString (jsonstring , joptions );
88478847 list = new ArrayList <CBORObject >();
88488848 for (CBORObject key : cbor .getKeys ()) {
88498849 list .add (key );
88508850 }
8851- Assert .assertEquals (CBORObject .FromObject ("3" ),list .get (0 ));
8852- Assert .assertEquals (CBORObject .FromObject ("2" ),list .get (1 ));
8853- Assert .assertEquals (CBORObject .FromObject ("1" ),list .get (2 ));
8851+ Assert .assertEquals (CBORObject .FromObject ("3" ), list .get (0 ));
8852+ Assert .assertEquals (CBORObject .FromObject ("2" ), list .get (1 ));
8853+ Assert .assertEquals (CBORObject .FromObject ("1" ), list .get (2 ));
88548854
88558855 jsonstring = "{\" 3\" :0,\" 2\" :0,\" 1\" :0}" ;
88568856 bytes = DataUtilities .GetUtf8Bytes (jsonstring , false );
@@ -8859,9 +8859,9 @@ public void TestKeepKeyOrder() {
88598859 for (CBORObject key : cbor .getKeys ()) {
88608860 list .add (key );
88618861 }
8862- Assert .assertEquals (CBORObject .FromObject ("3" ),list .get (0 ));
8863- Assert .assertEquals (CBORObject .FromObject ("2" ),list .get (1 ));
8864- Assert .assertEquals (CBORObject .FromObject ("1" ),list .get (2 ));
8862+ Assert .assertEquals (CBORObject .FromObject ("3" ), list .get (0 ));
8863+ Assert .assertEquals (CBORObject .FromObject ("2" ), list .get (1 ));
8864+ Assert .assertEquals (CBORObject .FromObject ("1" ), list .get (2 ));
88658865 }
88668866
88678867 @ Test
@@ -9372,67 +9372,67 @@ public void TestApplyJSONPatch() {
93729372 CBORObject .NewArray ().Add (1 ),
93739373 patch );
93749374
9375- TestApplyJSONPatchOpReplace (
9375+ this . TestApplyJSONPatchOpReplace (
93769376 CBORObject .NewArray ().Add (1 ).Add (3 ),
93779377 CBORObject .NewArray ().Add (1 ).Add (2 ),
93789378 "/1" ,
93799379 3 );
9380- TestApplyJSONPatchOpReplace (
9380+ this . TestApplyJSONPatchOpReplace (
93819381 CBORObject .NewArray ().Add (3 ).Add (2 ),
93829382 CBORObject .NewArray ().Add (1 ).Add (2 ),
93839383 "/0" ,
93849384 3 );
9385- TestApplyJSONPatchOpReplace (
9385+ this . TestApplyJSONPatchOpReplace (
93869386 null ,
93879387 CBORObject .NewArray ().Add (1 ).Add (2 ),
93889388 "/00" ,
93899389 3 );
9390- TestApplyJSONPatchOpReplace (
9390+ this . TestApplyJSONPatchOpReplace (
93919391 null ,
93929392 CBORObject .NewArray ().Add (1 ).Add (2 ),
93939393 "/00000" ,
93949394 3 );
9395- TestApplyJSONPatchOpReplace (
9395+ this . TestApplyJSONPatchOpReplace (
93969396 CBORObject .NewMap ().Add ("f1" , "f2" ).Add ("f3" , 3 ),
93979397 CBORObject .NewMap ().Add ("f1" , "f2" ).Add ("f3" , "f4" ),
93989398 "/f3" ,
93999399 3 );
9400- TestApplyJSONPatchOpReplace (
9400+ this . TestApplyJSONPatchOpReplace (
94019401 CBORObject .NewMap ().Add ("f1" , 3 ).Add ("f3" , "f4" ),
94029402 CBORObject .NewMap ().Add ("f1" , "f2" ).Add ("f3" , "f4" ),
94039403 "/f1" ,
94049404 3 );
9405- TestApplyJSONPatchOpReplace (
9405+ this . TestApplyJSONPatchOpReplace (
94069406 null ,
94079407 CBORObject .NewMap ().Add ("f1" , "f2" ).Add ("f3" , "f4" ),
94089408 "/foo" ,
94099409 3 );
9410- TestApplyJSONPatchOpReplace (
9410+ this . TestApplyJSONPatchOpReplace (
94119411 null ,
94129412 CBORObject .NewMap ().Add ("f1" , "f2" ).Add ("f3" , "f4" ),
94139413 "/f1/xyz" ,
94149414 3 );
9415- TestApplyJSONPatchOpReplace (
9415+ this . TestApplyJSONPatchOpReplace (
94169416 null ,
94179417 CBORObject .NewMap ().Add ("f1" , "f2" ).Add ("f3" , "f4" ),
94189418 "/f1/" ,
94199419 3 );
9420- TestApplyJSONPatchOpReplace (
9420+ this . TestApplyJSONPatchOpReplace (
94219421 null ,
94229422 CBORObject .NewMap ().Add ("f1" , "f2" ).Add ("f3" , "f4" ),
94239423 "/0" ,
94249424 3 );
9425- TestApplyJSONPatchOpReplace (
9425+ this . TestApplyJSONPatchOpReplace (
94269426 null ,
94279427 CBORObject .NewMap ().Add ("f1" , "f2" ).Add ("f3" , "f4" ),
94289428 "/-" ,
94299429 3 );
9430- TestApplyJSONPatchOpReplace (
9430+ this . TestApplyJSONPatchOpReplace (
94319431 null ,
94329432 CBORObject .NewArray ().Add (1 ).Add (2 ),
94339433 "/-" ,
94349434 3 );
9435- TestApplyJSONPatchOpReplace (
9435+ this . TestApplyJSONPatchOpReplace (
94369436 null ,
94379437 CBORObject .NewArray ().Add (1 ).Add (2 ),
94389438 "/foo" ,
@@ -9545,7 +9545,7 @@ public void TestApplyJSONPatch() {
95459545 @ Test
95469546 public void TestAtJSONPointer () {
95479547 CBORObject cbor ;
9548- cbor = CBORObject .FromObject ("xyz" );
9548+ cbor = CBORObject .FromObject ("xyz" );
95499549 Assert .assertEquals (cbor , cbor .AtJSONPointer ("" ));
95509550 try {
95519551 cbor .AtJSONPointer (null );
@@ -9691,7 +9691,7 @@ public void TestAtJSONPointer() {
96919691 throw new IllegalStateException ("" , ex );
96929692 }
96939693 cbor .Add (3 );
9694- Assert .assertEquals (cbor .get (0 ),cbor .AtJSONPointer ("/0" ));
9694+ Assert .assertEquals (cbor .get (0 ), cbor .AtJSONPointer ("/0" ));
96959695 try {
96969696 cbor .AtJSONPointer ("/1" );
96979697 Assert .fail ("Should have failed" );
@@ -9710,7 +9710,7 @@ public void TestAtJSONPointer() {
97109710 Assert .fail (ex .toString ());
97119711 throw new IllegalStateException ("" , ex );
97129712 }
9713- cbor = CBORObject .NewMap ().Add ("foo" ,0 );
9713+ cbor = CBORObject .NewMap ().Add ("foo" , 0 );
97149714 Assert .assertEquals (cbor , cbor .AtJSONPointer ("" ));
97159715 try {
97169716 cbor .AtJSONPointer (null );
@@ -9730,7 +9730,7 @@ public void TestAtJSONPointer() {
97309730 Assert .fail (ex .toString ());
97319731 throw new IllegalStateException ("" , ex );
97329732 }
9733- Assert .assertEquals (cbor .get ("foo" ),cbor .AtJSONPointer ("/foo" ));
9733+ Assert .assertEquals (cbor .get ("foo" ), cbor .AtJSONPointer ("/foo" ));
97349734 try {
97359735 cbor .AtJSONPointer ("/bar" );
97369736 Assert .fail ("Should have failed" );
@@ -9740,19 +9740,20 @@ public void TestAtJSONPointer() {
97409740 Assert .fail (ex .toString ());
97419741 throw new IllegalStateException ("" , ex );
97429742 }
9743- cbor =CBORObject .NewMap ().Add ("f~o" ,0 );
9744- Assert .assertEquals (cbor .get ("f~o" ),cbor .AtJSONPointer ("/f~0o" ));
9745- cbor =CBORObject .NewMap ().Add ("f~0o" ,0 );
9746- Assert .assertEquals (cbor .get ("f~0o" ),cbor .AtJSONPointer ("/f~00o" ));
9747- cbor =CBORObject .NewMap ().Add ("f~1o" ,0 );
9748- Assert .assertEquals (cbor .get ("f~1o" ),cbor .AtJSONPointer ("/f~01o" ));
9749- cbor =CBORObject .NewMap ().Add ("f/o" ,0 );
9750- Assert .assertEquals (cbor .get ("f/o" ),cbor .AtJSONPointer ("/f~1o" ));
9751- cbor =CBORObject .NewMap ().Add ("foo" ,CBORObject .NewMap ().Add ("bar" ,345 ));
9743+ cbor = CBORObject .NewMap ().Add ("f~o" , 0 );
9744+ Assert .assertEquals (cbor .get ("f~o" ), cbor .AtJSONPointer ("/f~0o" ));
9745+ cbor = CBORObject .NewMap ().Add ("f~0o" , 0 );
9746+ Assert .assertEquals (cbor .get ("f~0o" ), cbor .AtJSONPointer ("/f~00o" ));
9747+ cbor = CBORObject .NewMap ().Add ("f~1o" , 0 );
9748+ Assert .assertEquals (cbor .get ("f~1o" ), cbor .AtJSONPointer ("/f~01o" ));
9749+ cbor = CBORObject .NewMap ().Add ("f/o" , 0 );
9750+ Assert .assertEquals (cbor .get ("f/o" ), cbor .AtJSONPointer ("/f~1o" ));
9751+ cbor = CBORObject .NewMap ().Add ("foo" , CBORObject .NewMap ().Add ("bar" ,
9752+ 345 ));
97529753
9753- Assert .assertEquals (CBORObject .FromObject (345 ),cbor .AtJSONPointer ("/foo/bar" ));
9754- cbor = CBORObject .NewMap ().Add ("foo" ,CBORObject .NewArray ().Add (678 ));
9755- Assert .assertEquals (CBORObject .FromObject (678 ),cbor .AtJSONPointer ("/foo/0" ));
9754+ Assert .assertEquals (CBORObject .FromObject (345 ), cbor .AtJSONPointer ("/foo/bar" ));
9755+ cbor = CBORObject .NewMap ().Add ("foo" , CBORObject .NewArray ().Add (678 ));
9756+ Assert .assertEquals (CBORObject .FromObject (678 ), cbor .AtJSONPointer ("/foo/0" ));
97569757 try {
97579758 cbor .AtJSONPointer ("/foo/1" );
97589759 Assert .fail ("Should have failed" );
@@ -9780,10 +9781,10 @@ public void TestAtJSONPointer() {
97809781 Assert .fail (ex .toString ());
97819782 throw new IllegalStateException ("" , ex );
97829783 }
9783- cbor = CBORObject .NewMap ().Add ("-" ,0 );
9784- Assert .assertEquals (cbor .get ("-" ),cbor .AtJSONPointer ("/-" ));
9784+ cbor = CBORObject .NewMap ().Add ("-" , 0 );
9785+ Assert .assertEquals (cbor .get ("-" ), cbor .AtJSONPointer ("/-" ));
97859786 cbor = CBORObject .NewMap ().Add ("" , 0 );
9786- Assert .assertEquals (cbor .get ("" ),cbor .AtJSONPointer ("/" ));
9787+ Assert .assertEquals (cbor .get ("" ), cbor .AtJSONPointer ("/" ));
97879788 }
97889789
97899790 @ Test
0 commit comments