Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

added test code to testRetrieve corresponding to the case of fieldlist b... #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion TestRemoteTKController.cls
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,15 @@ public class TestRemoteTKController{

assertRecord(result, accName, accNumber, 'RemoteTKController.retrieve');

// fieldlist == null
jsonResult = RemoteTKController.retrieve('Account', id, null);
result = (Map<String, Object>)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
}

Expand Down Expand Up @@ -303,4 +312,4 @@ public class TestRemoteTKController{
'"Phone" : "(444) 222-3333"');
testDelete(id);
}
}
}