@@ -8838,19 +8838,19 @@ public void TestKeepKeyOrder() {
8838
8838
for (CBORObject key : cbor .getKeys ()) {
8839
8839
list .add (key );
8840
8840
}
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 ));
8844
8844
8845
8845
jsonstring = "{\" 3\" :0,\" 2\" :0,\" 1\" :0}" ;
8846
8846
cbor = CBORObject .FromJSONString (jsonstring , joptions );
8847
8847
list = new ArrayList <CBORObject >();
8848
8848
for (CBORObject key : cbor .getKeys ()) {
8849
8849
list .add (key );
8850
8850
}
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 ));
8854
8854
8855
8855
jsonstring = "{\" 3\" :0,\" 2\" :0,\" 1\" :0}" ;
8856
8856
bytes = DataUtilities .GetUtf8Bytes (jsonstring , false );
@@ -8859,9 +8859,9 @@ public void TestKeepKeyOrder() {
8859
8859
for (CBORObject key : cbor .getKeys ()) {
8860
8860
list .add (key );
8861
8861
}
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 ));
8865
8865
}
8866
8866
8867
8867
@ Test
@@ -9372,67 +9372,67 @@ public void TestApplyJSONPatch() {
9372
9372
CBORObject .NewArray ().Add (1 ),
9373
9373
patch );
9374
9374
9375
- TestApplyJSONPatchOpReplace (
9375
+ this . TestApplyJSONPatchOpReplace (
9376
9376
CBORObject .NewArray ().Add (1 ).Add (3 ),
9377
9377
CBORObject .NewArray ().Add (1 ).Add (2 ),
9378
9378
"/1" ,
9379
9379
3 );
9380
- TestApplyJSONPatchOpReplace (
9380
+ this . TestApplyJSONPatchOpReplace (
9381
9381
CBORObject .NewArray ().Add (3 ).Add (2 ),
9382
9382
CBORObject .NewArray ().Add (1 ).Add (2 ),
9383
9383
"/0" ,
9384
9384
3 );
9385
- TestApplyJSONPatchOpReplace (
9385
+ this . TestApplyJSONPatchOpReplace (
9386
9386
null ,
9387
9387
CBORObject .NewArray ().Add (1 ).Add (2 ),
9388
9388
"/00" ,
9389
9389
3 );
9390
- TestApplyJSONPatchOpReplace (
9390
+ this . TestApplyJSONPatchOpReplace (
9391
9391
null ,
9392
9392
CBORObject .NewArray ().Add (1 ).Add (2 ),
9393
9393
"/00000" ,
9394
9394
3 );
9395
- TestApplyJSONPatchOpReplace (
9395
+ this . TestApplyJSONPatchOpReplace (
9396
9396
CBORObject .NewMap ().Add ("f1" , "f2" ).Add ("f3" , 3 ),
9397
9397
CBORObject .NewMap ().Add ("f1" , "f2" ).Add ("f3" , "f4" ),
9398
9398
"/f3" ,
9399
9399
3 );
9400
- TestApplyJSONPatchOpReplace (
9400
+ this . TestApplyJSONPatchOpReplace (
9401
9401
CBORObject .NewMap ().Add ("f1" , 3 ).Add ("f3" , "f4" ),
9402
9402
CBORObject .NewMap ().Add ("f1" , "f2" ).Add ("f3" , "f4" ),
9403
9403
"/f1" ,
9404
9404
3 );
9405
- TestApplyJSONPatchOpReplace (
9405
+ this . TestApplyJSONPatchOpReplace (
9406
9406
null ,
9407
9407
CBORObject .NewMap ().Add ("f1" , "f2" ).Add ("f3" , "f4" ),
9408
9408
"/foo" ,
9409
9409
3 );
9410
- TestApplyJSONPatchOpReplace (
9410
+ this . TestApplyJSONPatchOpReplace (
9411
9411
null ,
9412
9412
CBORObject .NewMap ().Add ("f1" , "f2" ).Add ("f3" , "f4" ),
9413
9413
"/f1/xyz" ,
9414
9414
3 );
9415
- TestApplyJSONPatchOpReplace (
9415
+ this . TestApplyJSONPatchOpReplace (
9416
9416
null ,
9417
9417
CBORObject .NewMap ().Add ("f1" , "f2" ).Add ("f3" , "f4" ),
9418
9418
"/f1/" ,
9419
9419
3 );
9420
- TestApplyJSONPatchOpReplace (
9420
+ this . TestApplyJSONPatchOpReplace (
9421
9421
null ,
9422
9422
CBORObject .NewMap ().Add ("f1" , "f2" ).Add ("f3" , "f4" ),
9423
9423
"/0" ,
9424
9424
3 );
9425
- TestApplyJSONPatchOpReplace (
9425
+ this . TestApplyJSONPatchOpReplace (
9426
9426
null ,
9427
9427
CBORObject .NewMap ().Add ("f1" , "f2" ).Add ("f3" , "f4" ),
9428
9428
"/-" ,
9429
9429
3 );
9430
- TestApplyJSONPatchOpReplace (
9430
+ this . TestApplyJSONPatchOpReplace (
9431
9431
null ,
9432
9432
CBORObject .NewArray ().Add (1 ).Add (2 ),
9433
9433
"/-" ,
9434
9434
3 );
9435
- TestApplyJSONPatchOpReplace (
9435
+ this . TestApplyJSONPatchOpReplace (
9436
9436
null ,
9437
9437
CBORObject .NewArray ().Add (1 ).Add (2 ),
9438
9438
"/foo" ,
@@ -9545,7 +9545,7 @@ public void TestApplyJSONPatch() {
9545
9545
@ Test
9546
9546
public void TestAtJSONPointer () {
9547
9547
CBORObject cbor ;
9548
- cbor = CBORObject .FromObject ("xyz" );
9548
+ cbor = CBORObject .FromObject ("xyz" );
9549
9549
Assert .assertEquals (cbor , cbor .AtJSONPointer ("" ));
9550
9550
try {
9551
9551
cbor .AtJSONPointer (null );
@@ -9691,7 +9691,7 @@ public void TestAtJSONPointer() {
9691
9691
throw new IllegalStateException ("" , ex );
9692
9692
}
9693
9693
cbor .Add (3 );
9694
- Assert .assertEquals (cbor .get (0 ),cbor .AtJSONPointer ("/0" ));
9694
+ Assert .assertEquals (cbor .get (0 ), cbor .AtJSONPointer ("/0" ));
9695
9695
try {
9696
9696
cbor .AtJSONPointer ("/1" );
9697
9697
Assert .fail ("Should have failed" );
@@ -9710,7 +9710,7 @@ public void TestAtJSONPointer() {
9710
9710
Assert .fail (ex .toString ());
9711
9711
throw new IllegalStateException ("" , ex );
9712
9712
}
9713
- cbor = CBORObject .NewMap ().Add ("foo" ,0 );
9713
+ cbor = CBORObject .NewMap ().Add ("foo" , 0 );
9714
9714
Assert .assertEquals (cbor , cbor .AtJSONPointer ("" ));
9715
9715
try {
9716
9716
cbor .AtJSONPointer (null );
@@ -9730,7 +9730,7 @@ public void TestAtJSONPointer() {
9730
9730
Assert .fail (ex .toString ());
9731
9731
throw new IllegalStateException ("" , ex );
9732
9732
}
9733
- Assert .assertEquals (cbor .get ("foo" ),cbor .AtJSONPointer ("/foo" ));
9733
+ Assert .assertEquals (cbor .get ("foo" ), cbor .AtJSONPointer ("/foo" ));
9734
9734
try {
9735
9735
cbor .AtJSONPointer ("/bar" );
9736
9736
Assert .fail ("Should have failed" );
@@ -9740,19 +9740,20 @@ public void TestAtJSONPointer() {
9740
9740
Assert .fail (ex .toString ());
9741
9741
throw new IllegalStateException ("" , ex );
9742
9742
}
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 ));
9752
9753
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" ));
9756
9757
try {
9757
9758
cbor .AtJSONPointer ("/foo/1" );
9758
9759
Assert .fail ("Should have failed" );
@@ -9780,10 +9781,10 @@ public void TestAtJSONPointer() {
9780
9781
Assert .fail (ex .toString ());
9781
9782
throw new IllegalStateException ("" , ex );
9782
9783
}
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 ("/-" ));
9785
9786
cbor = CBORObject .NewMap ().Add ("" , 0 );
9786
- Assert .assertEquals (cbor .get ("" ),cbor .AtJSONPointer ("/" ));
9787
+ Assert .assertEquals (cbor .get ("" ), cbor .AtJSONPointer ("/" ));
9787
9788
}
9788
9789
9789
9790
@ Test
0 commit comments