diff --git a/TestRemoteTKController.cls b/TestRemoteTKController.cls index daade25..5fc2fc2 100644 --- a/TestRemoteTKController.cls +++ b/TestRemoteTKController.cls @@ -150,6 +150,15 @@ public class TestRemoteTKController{ assertRecord(result, accName, accNumber, 'RemoteTKController.retrieve'); + // fieldlist == null + jsonResult = RemoteTKController.retrieve('Account', id, null); + result = (Map)JSON.deserializeUntyped(jsonResult); + assertRecord(result, accName, accNumber, 'RemoteTKController.retrieve'); + + // fieldlist == null, unexisting object specified + jsonResult = RemoteTKController.retrieve('AccountX', id, null); + assertError(jsonResult, 'NOT_FOUND', 'RemoteTKController.retrieve'); + // TODO - test negative paths for retrieve } @@ -303,4 +312,4 @@ public class TestRemoteTKController{ '"Phone" : "(444) 222-3333"'); testDelete(id); } -} \ No newline at end of file +}