@@ -386,10 +386,10 @@ public void TestValidJsonPagingResponseNoParameters()
386386 return "{\" stat\" : \" OK\" , \" response\" : \" hello, world!\" , \" metadata\" : {\" next_offset\" :10}}" ;
387387 } ;
388388 var parameters = new Dictionary < string , string > ( ) ;
389- var jsonResponse = api . JSONPagingApiCall ( "GET" , "/json_ok" , parameters , 0 , 10 ) ;
390- Assert . Equal ( "hello, world!" , jsonResponse [ "response" ] ) ;
391- var metadata = jsonResponse [ "metadata" ] as Dictionary < string , object > ;
392- Assert . Equal ( 10 , metadata [ " next_offset" ] ) ;
389+ var jsonResponse = api . JSONPagingApiCall < string > ( "GET" , "/json_ok" , parameters , 0 , 10 , out var metadata ) ;
390+ Assert . Equal ( "hello, world!" , jsonResponse ) ;
391+
392+ Assert . Equal ( 10 , metadata . next_offset ) ;
393393 // make sure parameters was not changed as a side-effect
394394 Assert . Empty ( parameters ) ;
395395 }
@@ -406,10 +406,10 @@ public void TestValidJsonPagingResponseExistingParameters()
406406 { "offset" , "0" } ,
407407 { "limit" , "10" }
408408 } ;
409- var jsonResponse = api . JSONPagingApiCall ( "GET" , "/json_ok" , parameters , 10 , 20 ) ;
410- Assert . Equal ( "hello, world!" , jsonResponse [ "response" ] ) ;
411- var metadata = jsonResponse [ "metadata" ] as Dictionary < string , object > ;
412- Assert . False ( metadata . ContainsKey ( "next_offset" ) ) ;
409+ var jsonResponse = api . JSONPagingApiCall < string > ( "GET" , "/json_ok" , parameters , 10 , 20 , out var metadata ) ;
410+ Assert . Equal ( "hello, world!" , jsonResponse ) ;
411+
412+ Assert . NotNull ( metadata ) ;
413413 // make sure parameters was not changed as a side-effect
414414 Assert . Equal ( 2 , parameters . Count ) ;
415415 Assert . Equal ( "0" , parameters [ "offset" ] ) ;
@@ -456,7 +456,7 @@ public void TestJsonResponseMissingField()
456456 } ) ;
457457
458458 Assert . NotNull ( ex ) ;
459- var e = Assert . IsType < BadResponseException > ( ex ) ;
459+ var e = Assert . IsType < ApiException > ( ex ) ;
460460
461461 Assert . Equal ( 400 , e . HttpStatus ) ;
462462
0 commit comments