From a1429e38935117e2d340c1722906d42af41ce2f2 Mon Sep 17 00:00:00 2001 From: Kazuki Nakajima Date: Sat, 13 Jul 2013 18:04:55 +0900 Subject: [PATCH] added test code to testRetrieve corresponding to the case of fieldlist being null --- TestRemoteTKController.cls | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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 +}